Datestamp adjacent cell to data input - 2 date columns on same sheet
Posted by Sid on July 20, 2001 6:05 AM
I have a list in the format
H I J K
Fitted By Date Fitted Removed By Date Removed
Cells in H & J are inputed by a data validation list. I want adjacent cells in I & K to have the current date inserted automatically.
I've been thro' the problem of Cell I2 =IF(NOT(H2=""),NOW(),"") being reset to the current date each time workbook is opened.
I have found this code on this most excel-lent messageboard, but can only get it to work for 1 column. Anybody know how to get it to work for both date columns
Private Sub Worksheet_Change(ByVal Target As Range)
Dim keyRange As Range
Set keyRange = Range("h:h")
If Not Intersect(keyRange, Target) Is Nothing Then
Target.Offset(0, 1) = Date
End If
End Sub
Thanx Sid