IF then problem for beginner

D

dave

I have five cells that show
6.03% 3% 3% -0.07% and 7440

If any of the first four cells contain a negative number,
how would I display "warning" in the fifth cell instead
of 7440
 
B

brianwa

Try this:

=if(d2<0,"Warning","")

The "" will make the cell blank if d2 is greater than 0.

Regards
BW
 
B

brianwa

My appologies I didn't read you post thoughly enough

Try this:

=IF(A5<0,"Warning",IF(B5<0,"Warning",IF(C5<0,"Warning",IF(D5<0,"Warning",""))))

Regards,
BW
 
E

Earl Kiosterud

A couple more possibilities:

=IF(OR(A5<0, B5<0, C5<0, D5<0), "Warning,"")

Or this array formula (Use Ctrl-Shift-Enter)

=IF(OR(A5:D5<0),"warning","")
 
Top