If blank statement

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

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(C2>D2,TEXT(F2-C2,"h:mm"),TEXT(F2-D2,"h:mm"))

Thanks in advance.
 
Jim said:
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 -----
 
Back
Top