Excel IF Formula

G

GeneI

I have a spreadsheet with 4 cells that 1 of the 4 will have a calculated
value in it. I want to take the numeric value in the cell that has a value
and place it into another cell for information. Following is the string I
have written but I am doing something wrong.

=IF(E25>1, E25,IF(E27>1, E27, If(E29>1, E29,IF(E31>1, E31)))),"ERROR"

Any help would be greatly appreciated.
 
×

מיכ×ל (מיקי) ×בידן

This is your "corrected" formula:
=IF(E25>1,E25,IF(E27>1,E27,IF(E29>1,E29,IF(E31>1,E31,"ERROR"))))
Micky
 
R

Rick Rothstein

If only one of those cells will have a value in it and the rest are
guaranteed to be empty, then you can use this formula to do what you want..

=--(E25&E27&E29&E31)

The formula will generate a #VALUE! error if all of the cells are empty. If
that error message is not sufficient, then you can use this formula
instead...

=IF(E25&E27&E29&E31="","ERROR",--(E25&E27&E29&E31))
 
G

GeneI

Your suggestion worked. Should have posted question many hours before.
Thank you very much.
Happy New Year.
 

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