Nested IF functions error message

excelrocksmysocks

New Member
Joined
Dec 13, 2016
Messages
1
My nested if function returns the error message "too many arguments" even though there are only 4. If someone can help edit my function that'd be great.
This is my final formula
=IF((AND(B$1<=150,$A2<=100)),(16.88*$A2+20.99*B$1)-(8.7*$A2+11.51*B$1),IF((AND(B$1>=150,$A2>=100)),(16.88*$A2+20.99*B$1)-(8.7*$A2+11.51*B$1)),IF((AND(B$1>150,$A2<100)),((16.88*$A2+20.99*350+(MIN(B$1-150,100-$A2))*0.42*20.99)-(8.7*$A2+11.51*B$1)),IF((AND(B$1<150,$A2>100)),((16.88*100+20.99*B$1+(MIN($A2-100,150-B$1))*0.75*16.88)-(8.7*$A2+11.51*B$1)))))
 

Some videos you may like

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Anand Sharma

Board Regular
Joined
Nov 22, 2016
Messages
63
Hi

Try using below formula and change the result multiplication and adding values as I changed structure of formula only

=IF(AND(B$1<=150,$A2<=100), ((16.88*$A2)+(20.99*B$1)) - ((8.7*$A2)+(11.51*B$1)),
IF(AND(B$1>=150,$A2>=100), ((16.88*$A2)+(20.99*B$1)) - ((8.7*$A2)+(11.51*B$1)),
IF(AND(B$1>150,$A2<100), ((16.88*$A2)+(20.99*B$1)) - ((8.7*$A2)+(11.51*B$1)),
IF(AND(B$1<150,$A2>100), ((16.88*$A2)+(20.99*B$1)) - ((8.7*$A2)+(11.51*B$1)), ""))))
 

LateralThinker

New Member
Joined
May 7, 2014
Messages
11
Try this
=IF(AND(B$1<=150,$A2<=100),(16.88*$A2+20.99*B$1)-(8.7*$A2+11.51*B$1),
IF(AND(B$1>=150,$A2>=100),(16.88*$A2+20.99*B$1)-(8.7*$A2+11.51*B$1),
IF(AND(B$1>150,$A2<100),((16.88*$A2+20.99*350+(MIN(B$1-150,100-$A2))*0.42*20.99)-(8.7*$A2+11.51*B$1)),
IF(AND(B$1<150,$A2>100),((16.88*100+20.99*B$1+(MIN($A2-100,150-B$1))*0.75*16.88)-(8.7*$A2+11.51*B$1))))))
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,122,224
Messages
5,594,914
Members
413,952
Latest member
JGer

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