Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell, How do I put current time in a cell without updating others?

Status
Not open for further replies.

RayfromIntech

Electrical
Jun 2, 2003
34
I'm trying to create a data logg function.
A macro will insert a new row and time in the cell besides it. I am using the function hour (now()) and second(now())

When I insert the function =second (now()) It aslo updates all the other cell that have this function. (Not good)

Each event must keep the time of the event. How do I do this?
 
Replies continue below

Recommended for you

You could brute force it and insert the function outputs into cells and then copy/paste special values into the final output cells.

TTFN
 
The worksheet function Now() is evaluated each time the worksheet is recalculated. Therefore, you need something like this in your VB macro:
Code:
    a = Now
    [a1].Value = Hour(a)
    [b1].Value = Minute(a)
    [c1].Value = Second(a)


Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor