Multiple conditional statements in one cell?

chanson329

New Member
Joined
Jul 29, 2013
Messages
5
I need one cell to be subject to the followingconditional statements and just can't get the formula correct. Basically I need the cell to calculate three different conditions
=if(l8<10,0,l8)<o:p></o:p>
=if(l8>=10,and(c8>15),l8,0)<o:p></o:p>
=if(l8>=20,and(c8<15),l8,0)<o:p></o:p>
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

shyy

Well-known Member
Joined
Nov 6, 2008
Messages
1,484
Maybe

=IF(L8>10,L8,IF(AND(L8>=10,C8>15),L8,IF(AND(L8>=20,C8<15),L8,0)))
 

chanson329

New Member
Joined
Jul 29, 2013
Messages
5
I reworked things a bit and actually the following twostatements work a bit better. I thinkhowever that the two conditions will conflict and I can’t seem to get thesyntax correct.<o:p></o:p>
If(c7>=15,and(l7>=10)*l7,0))<o:p></o:p>
If(c7<15,and(l7>=20)*l7,0))<o:p></o:p>
 

shyy

Well-known Member
Joined
Nov 6, 2008
Messages
1,484

ADVERTISEMENT

Your syntax is indeed wrong, something like

=IF(AND(logical 1, logical 2),true,false
 

shyy

Well-known Member
Joined
Nov 6, 2008
Messages
1,484
<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px" style="background-color: #DAE7F5" /><col /><col /><col /></colgroup><thead><tr style=" background-color: #DAE7F5;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: right;;">9</td><td style="text-align: right;;"></td><td style="text-align: right;;">0</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;;">11</td><td style="text-align: right;;"></td><td style="text-align: right;;">11</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: right;;">11</td><td style="text-align: right;;">16</td><td style="text-align: right;;">11</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: right;;">21</td><td style="text-align: right;;">14</td><td style="text-align: right;;">21</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Sheet3</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">C1</th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">A1>=10,B1>15</font>),A1,IF(<font color="Red">AND(<font color="Green">A1>=20,B1<15</font>),A1,IF(<font color="Green">A1<10,0,A1</font>)</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">C2</th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">A2>=10,B2>15</font>),A2,IF(<font color="Red">AND(<font color="Green">A2>=20,B2<15</font>),A2,IF(<font color="Green">A2<10,0,A2</font>)</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">C3</th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">A3>=10,B3>15</font>),A3,IF(<font color="Red">AND(<font color="Green">A3>=20,B3<15</font>),A3,IF(<font color="Green">A3<10,0,A3</font>)</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">C4</th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">A4>=10,B4>15</font>),A4,IF(<font color="Red">AND(<font color="Green">A4>=20,B4<15</font>),A4,IF(<font color="Green">A4<10,0,A4</font>)</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
 

Watch MrExcel Video

Forum statistics

Threads
1,122,469
Messages
5,596,337
Members
414,058
Latest member
Kate Fergie

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