I want to put a timestamp NOW() in cell J2 ONLY when a user changes the value in cells C1:I1 (these are merged cells)
Any ideas?
Thanks much
I want to put a timestamp NOW() in cell J2 ONLY when a user changes the value in cells C1:I1 (these are merged cells)
Any ideas?
Thanks much
use the worksheet_change event:
![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Not (Intersect(Target, ActiveSheet.Range("c1:i1")) Is Nothing) Then Application.EnableEvents = False ActiveSheet.Range("j2") = Now() Application.EnableEvents = True End If End Sub
Hi ercedwards and welcome to the forum,
This takes event code that is behind the worksheet itself, not in a module. The code looks like this:
This is a starter as you will most likely want to build on the above. Here is also the workbook to try it out.![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("C1:I1")) Is Nothing Then Cells(1, "J") = Time End If End Sub
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Thanks ever so much. It works perfectly.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks