View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default If blank statement

"Jim" wrote:
If F2 is blank, I want it to disregard the formula and dislay 0.


=if(F2="", 0, TEXT(F2-MAX(C2,D2), "h:mm"))

If you format the cell with custom format h:mm, zero will be displayed as
0:00, if that's what you really want (I would).


----- original message -----

"Jim" wrote in message
...
I'm using the IF statement below on my spreadsheet, but cell F2 could
potentially be blank, and I'm having trouble writing that into the
statement.
If F2 is blank, I want it to disregard the formula and dislay 0. If it's
not blank, then use the formula.

=IF(C2D2,TEXT(F2-C2,"h:mm"),TEXT(F2-D2,"h:mm"))

Thanks in advance.