Hello,
I have a formula for time stamping, but I do not want to time stamp a column. Ionly want to time stamp 8 cells. I am still working on the work sheet so let'ssay the cells are D:10,D:25,D:35,D:50,D:65,D:79,D:90 AND D:110 .
This is the Macro code I used to time stamp column A.
rivate Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rCell As Range
Dim rChange As Range
On Error GoTo ErrHandler
Set rChange = Intersect(Target, Range("A:A"))
If Not rChange Is Nothing Then
Application.EnableEvents = False
For Each rCell In rChange
If rCell > "" Then
With rCell.Offset(0, 1)
.Value = Now
.NumberFormat = "hh:mm:ss"
End With
Else
rCell.Offset(0, 1).Clear
End If
Next
End If
ExitHandler:
Set rCell = Nothing
Set rChange = Nothing
Application.EnableEvents = True
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume ExitHandler
End Sub
Any help would be great,Thanks
Copan
I have a formula for time stamping, but I do not want to time stamp a column. Ionly want to time stamp 8 cells. I am still working on the work sheet so let'ssay the cells are D:10,D:25,D:35,D:50,D:65,D:79,D:90 AND D:110 .
This is the Macro code I used to time stamp column A.
rivate Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim rCell As Range
Dim rChange As Range
On Error GoTo ErrHandler
Set rChange = Intersect(Target, Range("A:A"))
If Not rChange Is Nothing Then
Application.EnableEvents = False
For Each rCell In rChange
If rCell > "" Then
With rCell.Offset(0, 1)
.Value = Now
.NumberFormat = "hh:mm:ss"
End With
Else
rCell.Offset(0, 1).Clear
End If
Next
End If
ExitHandler:
Set rCell = Nothing
Set rChange = Nothing
Application.EnableEvents = True
Exit Sub
ErrHandler:
MsgBox Err.Description
Resume ExitHandler
End Sub
Any help would be great,Thanks
Copan