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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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