ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   TIME (https://www.excelbanter.com/excel-discussion-misc-queries/136004-time.html)

LaDdIe

TIME
 
Hello,

OK, what i want to achive is this;
=IF(A10,NOW())
But!
How do I stop the time re-calculating each time?

Any help welcome


Don Guillett

TIME
 
You would have to manually convert to a value or use a macro or use
ctrl+colon or shift colon

--
Don Guillett
SalesAid Software

"LaDdIe" wrote in message
...
Hello,

OK, what i want to achive is this;
=IF(A10,NOW())
But!
How do I stop the time re-calculating each time?

Any help welcome




LaDdIe

TIME
 
Thanks Don, I'll go via the macro route

"Don Guillett" wrote:

You would have to manually convert to a value or use a macro or use
ctrl+colon or shift colon

--
Don Guillett
SalesAid Software

"LaDdIe" wrote in message
...
Hello,

OK, what i want to achive is this;
=IF(A10,NOW())
But!
How do I stop the time re-calculating each time?

Any help welcome





Gary''s Student

TIME
 
Use an event macro:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If IsEmpty(Range("B1")) Then
If Range("A1").Value 0 Then
Range("B1").Value = Now()
End If
End If
Application.EnableEvents = True
End Sub


This puts NOW() in B1, but as value and only once.


REMEMBER: this goes in worksheet code, not a standard module
--
Gary''s Student
gsnu200711


Dave Peterson

TIME
 
Take a look at the event macro that JE McGimpsey shares:
http://www.mcgimpsey.com/excel/timestamp.html

LaDdIe wrote:

Hello,

OK, what i want to achive is this;
=IF(A10,NOW())
But!
How do I stop the time re-calculating each time?

Any help welcome


--

Dave Peterson


All times are GMT +1. The time now is 02:55 PM.

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