TIME

L

LaDdIe

Hello,

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

Any help welcome
 
D

Don Guillett

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

Gary''s Student

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
 
Top