What is wrong with this Excel formula with an IF statement?

hermesalpha
hermesalpha used Ask the Experts™
on
This is my formula:

=IFERROR(IF(OR(AND($M$4="volt";U33<>0);U33-$F$26;"");(AND($M$4="auto";U33<>0);U33+$F$26;"");""))

But I can not get it to work.

What I want is that if M4 is "volt" and U33 contains a value, then U33-F26, or if M4 is "auto and U33 contains a value, then U33+F26. If not any of these conditions are fulfilled, then write nothing in the cell (keep it blank).
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
Hi,

pls try
=IFERROR(IF(AND($M$4="volt";U33<>0);U33-$F$26;IF(AND($M$4="auto";U33<>0);U33+$F$26;""))

Open in new window

Regards

Author

Commented:
I tried it now, and it says the formula is missing a parenthesis.
Top Expert 2016
Commented:
then try
=IFERROR(IF(AND($M$4="volt";U33<>0);U33-$F$26;IF(AND($M$4="auto";U33<>0);U33+$F$26;""));"")

Open in new window

Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

RaminTechnical Advisor

Commented:
Try This:

=IF(AND(M4="Volt",U33<>0),U33-F26,IF(AND(M4="Auto",U33<>0),U33+F26,""))

if required change the , to ;

Author

Commented:
Rgonzo1971, now it worked fine!

Author

Commented:
Thanks, this worked fine.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial