Time Date Stamp when range changes

P

PZ

Worksheet has changeable data clients input in columns W to AP.
Looking for macro to time date stamp in column V in the same row each
time the data is changed anywhere in columns W to AP. Some inputs are
freeform text and numbers, some are from dropdown list.

Most of the postings show how to have one column update the next
column over such as http://www.mcgimpsey.com/excel/
timestamp1.html#alt1

the only way i could get it to work for any changes for all columns
was to run the test for each column which starts to take time.

Seems like there should be an easier way to post the data to column V
for each row that regardless of which column generated the change
event. Possilbe to change McGimpsey's code to accomplish this task?
 
J

JE McGimpsey

One way:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If Not Intersect(Range("W:AP"), .Cells) Is Nothing Then
On Error Resume Next
Application.EnableEvents = False
If IsEmpty(.Value) Then
.EntireRow.Cells(22).ClearContents
Else
With .EntireRow.Cells(22)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top