Too many arguments

lewdow

New Member
Joined
Oct 8, 2008
Messages
25
Hi, I am trying to use a VLOOKUP function to fetch a value from a table on sheet 2 dependant upon the value entered in cell D1. I have done it for the first two columns in the table on sheet 2, but when I try to enter more, it says i have too many arguments....any ideas?

The formula I want to use goes something like....
=IF($D$1<=4,VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,4,0),IF(AND($D$1>=5,$D$1<=19),VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,5,0)),IF(AND($D$1>=20,$D$1<=49),VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,6,0)),IF(AND($D$1>=50,$D$1<=199),VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,7,0)),IF(AND($D$1>=200,$D$1<=349),VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,8,0)),IF(AND($D$1>=350,$D$1<=1499),VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,9,0)),IF($D$1>=1500),VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,5,0))

Thanks
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Welcome to the board...

Try this..
=VLOOKUP(B3,'Sheet 2'!$A$4:$J$70,LOOKUP($D$1,{0,5,20,50,200,350,1500},{4,5,6,7,8,9,5}),FALSE)

Hope that helps
 
Upvote 0
thanks so much, you don't understand how frustrating it was trying to get that to work!
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,895
Members
449,097
Latest member
dbomb1414

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