Excel says I entered too many arguments

Luaptar

New Member
Joined
Jun 23, 2017
Messages
29
Hi,

Good Morning!
Need some help on this formula, Excel says that I have entered too many arguments using this formula. I underlined the formula on which to work on.

This formula is not working
IF(B3<=20,INDEX('EXPORT 2017'!C20:L59,C4,C6),B3*INDEX('EXPORT 2017'!C62:L68,IF(AND($B$3>=21,$B$3<=44),1,IF(AND($B$3>=45,B3<=70),2,IF(AND(B3>=71,B3<=99),3,IF(AND(B3>=100,B3<=299),4,IF(AND(B3>=300,B3<=499),5,IF(AND(B3>=500,B3<=999),6,IF(B3>=1000,6))))))),SUMIF('EXPORT 2017'!$C$61:$L$61,B6,'EXPORT 2017'!$C$60:$L$60)))

But if I will only use 6 IF AND function, excel accepts the formula.

Below table is my reference on this one.[B]Excel 2007[/B][TABLE]
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>[TR="bgcolor: #E0E0F0"]
[TH][/TH]
[TH]A[/TH]
[TH]B[/TH]
[TH]C[/TH]
[TH]D[/TH]
[TH]E[/TH]
[TH]F[/TH]
[TH]G[/TH]
[TH]H[/TH]
[TH]I[/TH]
[TH]J[/TH]
[TH]K[/TH]
[TH]L[/TH]
[/TR]
</thead><tbody>[TR]
[TD="align: center"]61[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 1[/TD]
[TD="align: center"]Zone 2[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 3[/TD]
[TD="align: center"]Zone 4[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 5[/TD]
[TD="align: center"]Zone 6[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 7[/TD]
[TD="align: center"]Zone 8[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 9[/TD]
[TD="align: center"]Zone 10[/TD]
[/TR]
[TR]
[TD="align: center"]62[/TD]
[TD="align: center"]21-44[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.10[/TD]
[TD="align: center"]8.40[/TD]
[TD="bgcolor: #CCC0DA, align: center"]8.90[/TD]
[TD="align: center"]15.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]17.70[/TD]
[TD="align: center"]22.80[/TD]
[TD="bgcolor: #CCC0DA, align: center"]25.00[/TD]
[TD="align: center"]27.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]40.60[/TD]
[TD="align: center"]6.70[/TD]
[/TR]
[TR]
[TD="align: center"]63[/TD]
[TD="align: center"]45-70[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.70[/TD]
[TD="align: center"]8.20[/TD]
[TD="bgcolor: #CCC0DA, align: center"]8.40[/TD]
[TD="align: center"]14.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]17.60[/TD]
[TD="align: center"]21.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]23.80[/TD]
[TD="align: center"]24.80[/TD]
[TD="bgcolor: #CCC0DA, align: center"]36.00[/TD]
[TD="align: center"]6.50[/TD]
[/TR]
[TR]
[TD="align: center"]64[/TD]
[TD="align: center"]71-99[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.40[/TD]
[TD="align: center"]7.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]8.20[/TD]
[TD="align: center"]14.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]15.90[/TD]
[TD="align: center"]19.60[/TD]
[TD="bgcolor: #CCC0DA, align: center"]21.30[/TD]
[TD="align: center"]24.70[/TD]
[TD="bgcolor: #CCC0DA, align: center"]35.10[/TD]
[TD="align: center"]6.30[/TD]
[/TR]
[TR]
[TD="align: center"]65[/TD]
[TD="align: center"]100-299[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.30[/TD]
[TD="align: center"]7.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.50[/TD]
[TD="align: center"]11.70[/TD]
[TD="bgcolor: #CCC0DA, align: center"]14.40[/TD]
[TD="align: center"]19.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]21.10[/TD]
[TD="align: center"]24.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]30.30[/TD]
[TD="align: center"]6.20[/TD]
[/TR]
[TR]
[TD="align: center"]66[/TD]
[TD="align: center"]300-499[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.20[/TD]
[TD="align: center"]7.10[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.30[/TD]
[TD="align: center"]10.40[/TD]
[TD="bgcolor: #CCC0DA, align: center"]13.80[/TD]
[TD="align: center"]18.80[/TD]
[TD="bgcolor: #CCC0DA, align: center"]20.90[/TD]
[TD="align: center"]24.40[/TD]
[TD="bgcolor: #CCC0DA, align: center"]27.30[/TD]
[TD="align: center"]6.10[/TD]
[/TR]
[TR]
[TD="align: center"]67[/TD]
[TD="align: center"]500-999[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.10[/TD]
[TD="align: center"]7.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.10[/TD]
[TD="align: center"]10.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]13.60[/TD]
[TD="align: center"]18.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]20.50[/TD]
[TD="align: center"]24.20[/TD]
[TD="bgcolor: #CCC0DA, align: center"]24.90[/TD]
[TD="align: center"]6.00[/TD]
[/TR]
[TR]
[TD="align: center"]68[/TD]
[TD="align: center"]1000+[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.00[/TD]
[TD="align: center"]6.70[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.00[/TD]
[TD="align: center"]10.20[/TD]
[TD="bgcolor: #CCC0DA, align: center"]13.50[/TD]
[TD="align: center"]18.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]20.40[/TD]
[TD="align: center"]24.10[/TD]
[TD="bgcolor: #CCC0DA, align: center"]24.80[/TD]
[TD="align: center"]5.90[/TD]
[/TR]
</tbody>[/TABLE]
[CENTER][COLOR=#161120][B]EXPORT 2017[/B][/COLOR][/CENTER]




Thanks,
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
This part of the formula has addressed both the TRUE and FALSE criteria, anything after that would give an error !!

Code:
IF(B3<=20,INDEX('EXPORT 2017'!C20:L59,C4,C6),B3*INDEX('EXPORT 2017'!C62:L68)

This part
Code:
IF(AND($B$3>=21,$B$3<=44),1,IF(AND($B$3>=45,B3<=70),2,IF(AND(B3>=71,B3<=99),3,IF(AND(B3>=100,B3<=299),4,IF(AND(B3>=300,B3<=499),5,IF(AND(B3>=500,B3<=999),6,IF(B3>=1000,6)))))))

can be reduced to


Code:
LOOKUP(B3,{0,44,70,99,299,499,1000},{1,2,3,4,5,6,6})

and what will trigger this to happen
Code:
SUMIF('EXPORT 2017'!$C$61:$L$61,B6,'EXPORT 2017'!$C$60:$L$60)))
 
Upvote 0
If you reduce the formula down, you will see that the SUMIF argument is the problem
So, the Red part is if B3 is TRUE
The blue part is if it is FALSE

If they have been been addressed, the green part is "too many arguments"
Code:
=IF(B3<=20,[color=red]INDEX('EXPORT 2017'!C20:L59,C4,C6)[/color],[color=blue]B3*INDEX('EXPORT 2017'!C62:L68,LOOKUP(B3,{0,44,70,99,299,499,1000},{1,2,3,4,5,6,6})[/color][color=green],SUMIF('EXPORT 2017'!$C$61:$L$61,B6,'EXPORT 2017'!$C$60:$L$60)[/color]))
 
Upvote 0
Untested...try

Code:
=IF(B3<=20,INDEX('EXPORT 2017'!C20:L59,C4,C6),IF(B3>20,B3*INDEX('EXPORT 2017'!C62:L68,LOOKUP(B3,{0,44,70,99,299,499,1000},{1,2,3,4,5,6,6})),SUMIF('EXPORT 2017'!$C$61:$L$61,B6,'EXPORT 2017'!$C$60:$L$60)))
 
Upvote 0
Hi Michael,

Good Afternoon!
The formula is accepted by excel but when I change B3, result vector only follows 1, which is 7.10, if I will put B3=45, value should be 6.70 which is under result vector 2.


Code:
LOOKUP(B3,{0,44,70,99,299,499,1000},{[SIZE=5][I][U][B]1[/B][/U][/I][/SIZE],[SIZE=5][U][B]2[/B][/U][/SIZE],3,4,5,6,6})

[B]Excel 2007[/B][TABLE]
<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>[TR="bgcolor: #E0E0F0"]
[TH][/TH]
[TH]A[/TH]
[TH]B[/TH]
[TH]C[/TH]
[TH]D[/TH]
[TH]E[/TH]
[TH]F[/TH]
[TH]G[/TH]
[TH]H[/TH]
[TH]I[/TH]
[TH]J[/TH]
[TH]K[/TH]
[TH]L[/TH]
[/TR]
</thead><tbody>[TR]
[TD="align: center"]61[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 1[/TD]
[TD="align: center"]Zone 2[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 3[/TD]
[TD="align: center"]Zone 4[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 5[/TD]
[TD="align: center"]Zone 6[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 7[/TD]
[TD="align: center"]Zone 8[/TD]
[TD="bgcolor: #CCC0DA, align: center"]Zone 9[/TD]
[TD="align: center"]Zone 10[/TD]
[/TR]
[TR]
[TD="align: center"]62[/TD]
[TD="align: center"]21-44[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.10[/TD]
[TD="align: center"]8.40[/TD]
[TD="bgcolor: #CCC0DA, align: center"]8.90[/TD]
[TD="align: center"]15.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]17.70[/TD]
[TD="align: center"]22.80[/TD]
[TD="bgcolor: #CCC0DA, align: center"]25.00[/TD]
[TD="align: center"]27.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]40.60[/TD]
[TD="align: center"]6.70[/TD]
[/TR]
[TR]
[TD="align: center"]63[/TD]
[TD="align: center"]45-70[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.70[/TD]
[TD="align: center"]8.20[/TD]
[TD="bgcolor: #CCC0DA, align: center"]8.40[/TD]
[TD="align: center"]14.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]17.60[/TD]
[TD="align: center"]21.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]23.80[/TD]
[TD="align: center"]24.80[/TD]
[TD="bgcolor: #CCC0DA, align: center"]36.00[/TD]
[TD="align: center"]6.50[/TD]
[/TR]
[TR]
[TD="align: center"]64[/TD]
[TD="align: center"]71-99[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.40[/TD]
[TD="align: center"]7.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]8.20[/TD]
[TD="align: center"]14.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]15.90[/TD]
[TD="align: center"]19.60[/TD]
[TD="bgcolor: #CCC0DA, align: center"]21.30[/TD]
[TD="align: center"]24.70[/TD]
[TD="bgcolor: #CCC0DA, align: center"]35.10[/TD]
[TD="align: center"]6.30[/TD]
[/TR]
[TR]
[TD="align: center"]65[/TD]
[TD="align: center"]100-299[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.30[/TD]
[TD="align: center"]7.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.50[/TD]
[TD="align: center"]11.70[/TD]
[TD="bgcolor: #CCC0DA, align: center"]14.40[/TD]
[TD="align: center"]19.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]21.10[/TD]
[TD="align: center"]24.50[/TD]
[TD="bgcolor: #CCC0DA, align: center"]30.30[/TD]
[TD="align: center"]6.20[/TD]
[/TR]
[TR]
[TD="align: center"]66[/TD]
[TD="align: center"]300-499[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.20[/TD]
[TD="align: center"]7.10[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.30[/TD]
[TD="align: center"]10.40[/TD]
[TD="bgcolor: #CCC0DA, align: center"]13.80[/TD]
[TD="align: center"]18.80[/TD]
[TD="bgcolor: #CCC0DA, align: center"]20.90[/TD]
[TD="align: center"]24.40[/TD]
[TD="bgcolor: #CCC0DA, align: center"]27.30[/TD]
[TD="align: center"]6.10[/TD]
[/TR]
[TR]
[TD="align: center"]67[/TD]
[TD="align: center"]500-999[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.10[/TD]
[TD="align: center"]7.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.10[/TD]
[TD="align: center"]10.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]13.60[/TD]
[TD="align: center"]18.30[/TD]
[TD="bgcolor: #CCC0DA, align: center"]20.50[/TD]
[TD="align: center"]24.20[/TD]
[TD="bgcolor: #CCC0DA, align: center"]24.90[/TD]
[TD="align: center"]6.00[/TD]
[/TR]
[TR]
[TD="align: center"]68[/TD]
[TD="align: center"]1000+[/TD]
[TD="align: center"][/TD]
[TD="bgcolor: #CCC0DA, align: center"]6.00[/TD]
[TD="align: center"]6.70[/TD]
[TD="bgcolor: #CCC0DA, align: center"]7.00[/TD]
[TD="align: center"]10.20[/TD]
[TD="bgcolor: #CCC0DA, align: center"]13.50[/TD]
[TD="align: center"]18.00[/TD]
[TD="bgcolor: #CCC0DA, align: center"]20.40[/TD]
[TD="align: center"]24.10[/TD]
[TD="bgcolor: #CCC0DA, align: center"]24.80[/TD]
[TD="align: center"]5.90[/TD]
[/TR]
</tbody>[/TABLE]
[CENTER][COLOR=#161120][B]EXPORT 2017[/B][/COLOR][/CENTER]



Thanks for your assistance.
 
Upvote 0
Are you sure you are using B3....It works fine for me !!
 
Upvote 0
Hi Michael.

I'm sorry, I notice that it should be B2 not B3. the formula works very well. thanks!
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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