ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Proctecting =NOW() cell from auto update (https://www.excelbanter.com/excel-programming/277645-re-proctecting-%3Dnow-cell-auto-update.html)

Tom Ogilvy

Proctecting =NOW() cell from auto update
 
The only way to have the cell not update is to use a formula using
intentional circular references. To do this, you have to allow circular
references at the application level.

Tools=Options=Calculate
click the iterations box and set Max iterations to 1

then in C1
=IF(LEN(TRIM(A1))0,IF(C1="",NOW(),C1),"")

in E1

=IF(LEN(TRIM(D1))0,IF(E1="",NOW(),E1),"")

Clearing A1 (D1) will remove the time and the cell will appear empty.

An alternate approach would be to use the Worksheet_Change event if entries
are made manually.


--
Regards,
Tom Ogilvy



Tom Rector wrote in message
om...
Win2k office xp pro

I have a spreadsheet with two columns, column C "In" and column E
"Out", formula in both is Column C =if(A1" ",NOW()," ") and Column
E =if(D1" ",NOW()," "). Formated cells as TIME 13:30,

This so that if A1 is populated, the current time will show up in
C1 and for the second if D1 is populated the current time will show up
in E1.
Cell F1 has formula =(E1-C1)*24 to give elapsed time in decimal
format. Column F is formated as General

My problem is that cells C1 and E1 continualy update with current
system time.

I want to have the cell (time) locked when A1 and D1 are populated.
At variuos times, I will need user to clear the lock and start time
again. this should be accomnplished simply by 'blanking A1 and D1' and
adding new data to A1 and D1)
This purpose is to record time used when renting a work stall in a
hobby shop.

Agian, I really appreciate the help/answers this group always seems to
come up with !

Thanks Again,





All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com