2 IF statements in the same cell

pink

New Member
Joined
Jan 18, 2005
Messages
10
'IF(AND(OR(L9=1,L9=2),OR(M9=3,M9=4)),Sheet1!$D$32, IF(AND(OR(L9=3,L9=4),OR(M9=1,M9=2)),Sheet1!$D$33, IF(OR(M9=3,M9=4),Sheet1!$D$33,0)))'

This is my original formula, it works, but I also need to include another completely unrelated IF statement that says

'IF(OR(M9=3,M9=4), Sheet1!$D$32,0)'

This formula also works, but I need them to work together and independantly, in the same cell. If the second statement is true, I still need it to check if the first one is true, and to add the values together.

Is there any way to do that?

Thanks.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

tactps

Well-known Member
Joined
Jan 20, 2004
Messages
3,460
It sounds like you just want to add them:

=IF(AND(OR(L9=1,L9=2),OR(M9=3,M9=4)),Sheet1!$D$32, IF(AND(OR(L9=3,L9=4),OR(M9=1,M9=2)),Sheet1!$D$33, IF(OR(M9=3,M9=4),Sheet1!$D$33,0)))+IF(OR(M9=3,M9=4), Sheet1!$D$32,0)

Is that what you want?
 

pink

New Member
Joined
Jan 18, 2005
Messages
10
Yes, that worked, thank you. I didn't realize you could do that. :)
 

Forum statistics

Threads
1,148,396
Messages
5,746,452
Members
424,020
Latest member
LongDoo

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
Top