Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"default time to PM after 12:00 pm"
. com wrote: I'm trying to calculate the hh:mm difference between two cells and asking to do nothing if W1 is blank. Why am I getting 19:00 as a value from a calculation of: =IF(W1<X1,X1-W1,IF(W1="","",IF(W1X1,"",""))) I haven't a clue, since your posting does not tell us what is in W1 and X1. Why shouldn't the formula return 19:00? But here are some tweaks that you should consider for your formula. It might solve the problem coincidentally. First, if W1 is empty (not ""), your formula will return X1 because W1<X1 is true. I suspect that is not what you want. Second, the last term (if W1X1,...) is superfluous, albeit not harmful. Third, you assume that X1 cannot be empty or null text (""). Is that a valid assumption? At a minimum, try: =if(and(W1<"",W1<X1),X1-W1,"") Alternatively: =if(and(W1<"",X1<"",W1<X1),X1-W1,"") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Returning calculation status | Excel Worksheet Functions | |||
returning calculation based on number | Excel Worksheet Functions | |||
Stop time - start time calculation | Excel Worksheet Functions | |||
Nested If statements returning a sum calculation | Excel Worksheet Functions | |||
Time calculation (Subraction of Idle Time) | Excel Discussion (Misc queries) |