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)))))
 

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.
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)), ""))))
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
1,217,477
Messages
6,136,894
Members
450,029
Latest member
MissQuotation

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