Time stamp cell range

jamada

Active Member
Joined
Mar 23, 2006
Messages
323
Hi, sorry I'm having difficulties with this, solutions appreciated very much.

I'm trying to time stamp Column "L" and effected rows with current date time (24hour clock)

LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = LastRow To 2 Step -1
If Cells(i, 3).Value > 0 Then
Range(Cells(i, 13)) = NumberFormat "MMMDD hh:mm".Value = Now()

End If
Next i

Tks Graham
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Would it work if you changed the number format to;
Code:
Range(Cells(i, 13)) = Format(Now(), "MMMDD hh:mm")
 
Last edited:
Upvote 0
Hi BenGee, Thanks for the suggestion. Turns our my issue was using "Range", have corrected as follows.
Thank You!

LastRow = Range("A" & Rows.Count).End(xlUp).Row
For i = LastRow To 2 Step -1
If Cells(i, 3).Value > 0 Then
Application.EnableEvents = False
Cells(i, 13).Value = Now
Application.EnableEvents = True
End If
Next i

Application.CutCopyMode = False
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,974
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top