Dates change the next day.

T

TimM

I'm using the formula below to give a date in column 'A' when a 1, 2, 3, or 4
is put in column 'H'.
=IF(OR(H1={1,2,3,4}),TODAY(),"")

Is it possible to make it so the date does not change the next day when the
the sheet is update/opened, with this or with a different formula.
 
D

Don Guillett

How about a worksheet_open event in the ThisWorkbook module?

Sub ifdate()
MyArray = Array(1, 2, 3 , 4)
For Each c In MyArray
If Range("h1") = c Then Range("H3") = Date
Next
End Sub
 
T

TimM

Is there a way to do it with a script.
--
Thanks
TimM


Don Guillett said:
How about a worksheet_open event in the ThisWorkbook module?

Sub ifdate()
MyArray = Array(1, 2, 3 , 4)
For Each c In MyArray
If Range("h1") = c Then Range("H3") = Date
Next
End Sub
 
T

TimM

Sorry something my fingers are faster than the brain. I meant is there a way
to do it with out a script, and just use a formula.
 
D

Don Guillett

I guess you could use two cells
if F8
=TODAY()-1

another cell
=IF(TODAY()<>F8,TODAY())
 
D

Don Guillett

That won't work either because it is still using today() which will update
every time you calculate anything.
 
Top