jkingarena
Technical User
I have a code that will automatically put the date i start a new row. It works, but I would like this code to also do a lookup based on the date and return details about the date. A regular lookup doesn't work for me because each entry I make is a new row.
For example If I were to use the lookup below, I want the computer to automatically show "Valentines day, on an entry I filled out on 2/14. ( Please be aware my list of dates is much longer than the example list by several months)
ie
2/14 Valentines day
2/15 Work
2/16 Vacation
etc.....
Here is my code
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column < 7 Then
ThisRow = Target.Row
If Range("H" & ThisRow).Value = "" Then
If Target.Value = "" Then
Range("I" & ThisRow).Value = 0
ElseIf Target.Value <> 1.23456 Then
Range("H" & ThisRow).Value = Date
End If
End If
End If
End Sub
For example If I were to use the lookup below, I want the computer to automatically show "Valentines day, on an entry I filled out on 2/14. ( Please be aware my list of dates is much longer than the example list by several months)
ie
2/14 Valentines day
2/15 Work
2/16 Vacation
etc.....
Here is my code
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column < 7 Then
ThisRow = Target.Row
If Range("H" & ThisRow).Value = "" Then
If Target.Value = "" Then
Range("I" & ThisRow).Value = 0
ElseIf Target.Value <> 1.23456 Then
Range("H" & ThisRow).Value = Date
End If
End If
End If
End Sub