Multiple IF AND OR statements HELP

kulin

New Member
Joined
Nov 16, 2014
Messages
2
I want to perform a simple multiplication. I have two columns with default values (G9 and H9), and two columns that the user can put personalized information (E9 and F9). I want the calculation in column I9 to default to G9*H9, however there are three other scenarios that are preferred than the default. The best scenario is if E9 and F9 have information in which case I want this output in column I9. The other two situations is if E9 or F9 have information, but not simultaniously, in which case I would want E9*H9 or F9*G9.


My attempt has been the following

=IF((AND(E9<>0,F9<>0),E9*F9,G9*H9), OR(AND(E9<>0,F9=0),E9*H9,G9*H9), OR(AND(E9=0,F9<>0),G9*F9,G9*H9))

I appreciate your help!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
kulin,

Welcome to MrExcel.

Try.... =IF(AND(E9<>0,F9<>0),E9*F9,IF(E9<>0,E9*H9,IF(F9<>0,F9*G9,G9*H9)))


Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,226,729
Messages
6,192,696
Members
453,747
Latest member
tylerhyatt04

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top