// Automatically adds TODAY() to a cell when another cell //value changes
Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("F:F")) Is Nothing Then
Target.Offset(0, 4) = DateTime.Date
End If
End Sub
Totes MaGoates
// Written for UHD311/312's 01-Inventory Workbook.xlsm; only affects 'Totes MaGoats' worksheet.
// The 1st portion automatically obtains the date from value at "C33" and places into corresponding row whenever the "Oil Level In Inches" is edited.
// The 2nd portion locks the Date Cell from allowing it to be edited manually.
Private Sub Worksheet_Change(ByVal Target As Range)
' Watches cell (H6:H6) for change, then moves (Target.Offset(row, column) and inputs value from "C33"
If Not Intersect(Target, Range("H6:H6")) Is Nothing Then
Target.Offset(0, 1) = Range("C33").Value
End If
If Not Intersect(Target, Range("H9:H9")) Is Nothing Then
Target.Offset(0, 1) = Range("C33").Value
End If
If Not Intersect(Target, Range("H18:H18")) Is Nothing Then
Target.Offset(0, 1) = Range("C33").Value
End If
If Not Intersect(Target, Range("H19:H19")) Is Nothing Then
Target.Offset(0, 1) = Range("C33").Value
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Identifies Column and multiple Rows. Then, changes where mouse moves if one is selected.
If Target.Column = 10 Then
If Target.Row = 6 Or Target.Row = 7 Or Target.Row = 9 Or Target.Row = 10 Or Target.Row = 18 Or Target.Row = 19 Then
Beep
Cells(Target.Row, Target.Column).Offset(0, -1).Select
End If
End If
End Sub