hi,
I want to show current date & time in column B when cells in column A is change.
my formula is change all date when the last cell change
thanks in advance
herukuncahyono
hi,
I want to show current date & time in column B when cells in column A is change.
my formula is change all date when the last cell change
thanks in advance
herukuncahyono
try this:
Copy the code, right-click the sheet tab, click View Code and paste into the code window. Close the VB editor.![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Columns(1)) Is Nothing Then Application.EnableEvents = False Range("B" & Target.Row) = Now Application.EnableEvents = True End If End Sub
hello teylyn,
Thanks for code, one more question, if we want to change the format cell itself.
like if cell A1 value change e.g type apple the value in cell A1 is apple mmm/dd/yy h:mm AM/PM
thanks again
herukuncahyono
try
If you just want the date, but not the time, exchange the Now in the code with Date![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Columns(1)) Is Nothing Then Application.EnableEvents = False Range("B" & Target.Row) = target.value &" " & Now Application.EnableEvents = True End If End Sub
Can the code works for all cell, as we are typing in all places in sheet, the format cell value is change ?
thanks
herukuncahyono
Your question was
Can you please try to put yourself into the helper's shoes? If you post your real requirements from the start, a suitable solution could be provided first time round.I want to show current date & time in column B when cells in column A is change.
If you change the goal posts with every follow up post, it does not get any easier.
So.
Make up your mind what you want. Then post a complete description of your requirements. Be as specific as possible. For example, you wanted a time stamp in column B if a value in column A changes. Where would you want the time stamp for "all places in sheet" ??
Thanks
hi teylyn,
I use all the code and your suggestions.
I thought of other things that can be done by the code.I am sorry I'll try in new thread.
regards
herukuncahyono
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks