Time update

  • Thread starter Thread starter gusdafa
  • Start date Start date
G

gusdafa

Hi there,

I have a formula that updates the time wherever data is entered in the
B15 cell. I copied this formula down the column so that each update
(B16..B17) will have its on time update, the problem is that the latest
time update updates all the previous times to the current time. Can
someone help me rectify this please? I want times updated previously to
be locked and not updated anymore. I have tried locking nearly
everything in the formula but got thrown errors.

Here is the formula,
=IF(B15<>"",TIME(HOUR(NOW()),MINUTE(NOW()),SECOND(NOW())),"")

Thanks.
 
First, your formula can be simplified to:
=IF(B15<>"",NOW(),"")

But the bad news is that this formula will reevalate each time excel recalcs.

You could use enter the date and time by using a couple of shortcut keys:
ctrl-; (spacebar) ctrl-:

Or you could use an event macro that populates the cell when B15 (and more)
change. See JE McGimpsey's site:
http://www.mcgimpsey.com/excel/timestamp.html
 
The formula does not simplify to =IF(B15<>"",NOW(),"") but to
=IF(B15<>"",MOD(NOW(),1),""), but Dave is right that it would recalculate
each time.
 
Scroll down to the part: Using a worksheet event macro
You can't use formulas as the "date/time stamps" as these will recalc

You scrolled right past "Using circular references and worksheet functions".
 
First, your formula can be simplified to:
The formula does not simplify to =IF(B15<>"",NOW(),"") but to
=IF(B15<>"",MOD(NOW(),1),"")

Or even... =IF(B15<>"",NOW()-TODAY(),"")

Rick

 
You're right.

Thanks for the correction.

David said:
The formula does not simplify to =IF(B15<>"",NOW(),"") but to
=IF(B15<>"",MOD(NOW(),1),""), but Dave is right that it would recalculate
each time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top