If blank statement

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.
 
J

JoeU2004

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 -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top