Static Time Stamp Output

bcohen408

New Member
Joined
May 24, 2011
Messages
3
Hello,
I have an excel model where given a true value I need to see the time stamp that the first true occurs. This first time stamp would then be stored in a cell for reference. What I need is a macro to display the time of first true. Hopefully this makes sense.

Thanks in advance.
-B
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try along these lines: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Calculate()
If Range("A1").Value = True Then Range("B1").Value = Now
End Sub

Change A1 and B1 to suit.
 
Upvote 0
Thanks you very much. With the =now() parameter of the code, if the macro were rerun wouldnt that give the new time? I would some how need to "freeze" that first time.
 
Upvote 0
Thank you very much, I forgot to mention that A1 changes dynamically and we would need the time stamp to be just one the first instance that A1 changes.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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