rbobcat1
Member
New to VBA and I cannot seem to get this to work.
i am pretty sure it has to do with the first line
If i enter something in column C i want it to put the date in D.
Also when I change column F to 'Closed' I want it to put a date in G.
>>> use code - tags <<<
i am pretty sure it has to do with the first line
If i enter something in column C i want it to put the date in D.
Also when I change column F to 'Closed' I want it to put a date in G.
>>> use code - tags <<<
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
' Auto Date
Dim Cell As Range
For Each Cell In Target
If Cell.Column = Range("C:C").Column Then
If Cell.Value <> "" Then
Cells(Cell.Row, "D").Value = Now
Else
Cells(Cell.Row, "D").Value = ""
End If
End If
Next Cell
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
' Auto Date
Dim Cell As Range
For Each Cell In Target
If Cell.Column = Range("f:f").Column Then
If Cell.Value = "closed" Then
Cells(Cell.Row, "g").Value = Now
Else
Cells(Cell.Row, "g").Value = ""
End If
End If
Next Cell
End Sub
Last edited by a moderator: