Multiple Conditions ( AND & OR) in IF statement formula

krcraeanna

New Member
Joined
Sep 6, 2006
Messages
2
I have a question. Is it possible to combine multiple conditions ( AND & OR) in an IF statement in one formula?

Example:

=IF(AND(B3 > 0,C3 > 0,D3 >0,E3=0), D3, 0), IF(OR(C3 is NULL), D3, 0)


I want to say:

If (B3 > 0 and C3 > 0 and D3 >0 and E3=0) OR (C3 is NULL)
then
value of cell D3
else
0
end if.

I get a #NAME? error in the cell.

Thanks in advance for any ideas.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Try

=IF(OR(AND(B3 > 0,C3 > 0,D3 >0,E3=0),C3=""), D3, 0)
 

krcraeanna

New Member
Joined
Sep 6, 2006
Messages
2
It worked wonderfully! I never thought of nesting the conditions that way, I tried every other combination. Thanks again for your help!!!
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Perhaps:

=OR(AND(MAX(B3*C3*D3,0),E3=0),C3="")*D3
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Re: Multiple Conditions ( AND & OR) in IF statement form

I have a question. Is it possible to combine multiple conditions ( AND & OR) in an IF statement in one formula?

Example:

=IF(AND(B3 > 0,C3 > 0,D3 >0,E3=0), D3, 0), IF(OR(C3 is NULL), D3, 0)


I want to say:

If (B3 > 0 and C3 > 0 and D3 >0 and E3=0) OR (C3 is NULL)
then
value of cell D3
else
0
end if.

I get a #NAME? error in the cell.

Thanks in advance for any ideas.

If B3:E3 can only house numbers or empty cells (thus no text including "")...

=IF(OR(AND(B3 > 0, C3 > 0, D3 > 0, AND(ISNUMBER(E3), E3 = 0)), C3=0), D3, 0)
 

Forum statistics

Threads
1,140,924
Messages
5,703,182
Members
421,280
Latest member
Jaycee01

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