Why is E3=4 FALSE?
First point, the synax for "greater than or equals" is =, not =
Secondly, Excel date & time format counts in units of one day (24 hours), so
your time 4:45 in E3 hjas been compared with 4 days (96 hours).
You are saying that Excel reads 4 as 24, but you have in fact subtracted
4:45 from 4 days (96 hours), and got a result of 91:15, which is what you'd
have seen if the cell was formatted as [h]:mm, but as you'd formatted the
cell as something like h:mm you have not displayed the first 3 days, but
just the remaining 19:15.
If you want to compare with (and subtract from) 4 hours, not 4 days, then
you could try something like
=IF(E3=(--("4:00")),"DONE",("4:00"-D3)) or
=IF(E3=TIME(4,0,0),"DONE",(TIME(4,0,0)-D3))
--
David Biddulph
"johnthebaptist" wrote in message
...
Excel tells me that E3=4 is FALSE, where E3=4:45, a time format, and
formatting should be ignored.
The whole formula I'm trying to work out is: =IF(E3=4,"DONE",(4-D3)).
Excel accepts this but reads 4 as 24 and returns 19:15 for (4-D3).
OK, so (E3=4) is FALSE if 4=24, but why does Excel read 4 as 24? And how
do I get Excel to read 4 as 4:00 and return the difference between 4:00
and,
say, 3:27?
|