date help


Posted by mark on August 17, 2001 4:20 AM

what i need to do is when an item in column a reaches a trigger point (column I) i need the date that this occured to be shown in column H.
Ive submitted this question before, but couldnt get the solution to work
(i was directed to:18462.html)

can anyone help

thanks in advance



Posted by Robb on August 17, 2001 5:23 AM

Mark

Assuming you are entering a value in ColumnA and checking it against a value in ColumnI, with "todays" date to go in ColumnH if ColA>=ColI, try this code
in the Worksheet code:

Private Sub Worksheet_change(ByVal Target As Range)
If Not Intersect(Target, Columns(1)) Is Nothing Then
If Target >= Target.Offset(0, 8) And Target.Offset(0, 8) <> "" Then
Target.Offset(0, 7) = Date
Else
Target.Offset(0, 7) = ""
End If
Else
End If
End Sub

Does this help?

Regards