Nested IF and VLookup with Data Validation

Jinthesensei

New Member
Joined
Sep 4, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I'm having issues with this formula set up.

WeekData Validation List 1-18
TeamData Validation List of TeamsVSLong IF/VLookUp Formula

So in A2, I have a drop down to select the week number, and in B2, I have a drop down to select a team.
In B4, I have this formula. The idea is to being able to select the week and team and see who they play.

=IF(B1=1,VLOOKUP(B2,Sheet2!B:U,3,0),IF(B1=2,VLOOKUP(B2,Sheet2!B:U,4,0),IF(B1=3,VLOOKUP(B2,Sheet2!B:U,5,0),IF(B1=4,VLOOKUP(B2,Sheet2!B:U,6,0),IF(B1=5,VLOOKUP(B2,Sheet2!B:U,7,0),IF(B1=6,VLOOKUP(B2,Sheet2!B:U,8,0),IF(B1=7,VLOOKUP(B2,Sheet2!B:U,9,0),IF(B1=8,VLOOKUP(B2,Sheet2!B:U,10,0),IF(B9=1,VLOOKUP(B2,Sheet2!B:U,11,0),IF(B1=10,VLOOKUP(B2,Sheet2!B:U,12,0),IF(B1=11,VLOOKUP(B2,Sheet2!B:U,13,0),IF(B1=12,VLOOKUP(B2,Sheet2!B:U,14,0),IF(B1=13,VLOOKUP(B2,Sheet2!B:U,15,0),IF(B1=14,VLOOKUP(B2,Sheet2!B:U,16,0),IF(B1=15,VLOOKUP(B2,Sheet2!B:U,17,0),IF(B1=16,VLOOKUP(B2,Sheet2!B:U,18,0),IF(B1=17,VLOOKUP(B2,Sheet2!B:U,19,0),IF(B1=18,VLOOKUP(B2,Sheet2!B:U,20,0),"")))))))))))))))))

I either get the missing parenthesis error or too many arguments error.

What am I missing?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I'm having issues with this formula set up.

WeekData Validation List 1-18
TeamData Validation List of TeamsVSLong IF/VLookUp Formula

So in A2, I have a drop down to select the week number, and in B2, I have a drop down to select a team.
In B4, I have this formula. The idea is to being able to select the week and team and see who they play.

=IF(B1=1,VLOOKUP(B2,Sheet2!B:U,3,0),IF(B1=2,VLOOKUP(B2,Sheet2!B:U,4,0),IF(B1=3,VLOOKUP(B2,Sheet2!B:U,5,0),IF(B1=4,VLOOKUP(B2,Sheet2!B:U,6,0),IF(B1=5,VLOOKUP(B2,Sheet2!B:U,7,0),IF(B1=6,VLOOKUP(B2,Sheet2!B:U,8,0),IF(B1=7,VLOOKUP(B2,Sheet2!B:U,9,0),IF(B1=8,VLOOKUP(B2,Sheet2!B:U,10,0),IF(B9=1,VLOOKUP(B2,Sheet2!B:U,11,0),IF(B1=10,VLOOKUP(B2,Sheet2!B:U,12,0),IF(B1=11,VLOOKUP(B2,Sheet2!B:U,13,0),IF(B1=12,VLOOKUP(B2,Sheet2!B:U,14,0),IF(B1=13,VLOOKUP(B2,Sheet2!B:U,15,0),IF(B1=14,VLOOKUP(B2,Sheet2!B:U,16,0),IF(B1=15,VLOOKUP(B2,Sheet2!B:U,17,0),IF(B1=16,VLOOKUP(B2,Sheet2!B:U,18,0),IF(B1=17,VLOOKUP(B2,Sheet2!B:U,19,0),IF(B1=18,VLOOKUP(B2,Sheet2!B:U,20,0),"")))))))))))))))))

I either get the missing parenthesis error or too many arguments error.

What am I missing?

Corrected one of the IF statements, still not working.

=IF(B1=1,VLOOKUP(B2,Sheet2!B:U,3,0),IF(B1=2,VLOOKUP(B2,Sheet2!B:U,4,0),IF(B1=3,VLOOKUP(B2,Sheet2!B:U,5,0),IF(B1=4,VLOOKUP(B2,Sheet2!B:U,6,0),IF(B1=5,VLOOKUP(B2,Sheet2!B:U,7,0),IF(B1=6,VLOOKUP(B2,Sheet2!B:U,8,0),IF(B1=7,VLOOKUP(B2,Sheet2!B:U,9,0),IF(B1=8,VLOOKUP(B2,Sheet2!B:U,10,0),IF(B1=9,VLOOKUP(B2,Sheet2!B:U,11,0),IF(B1=10,VLOOKUP(B2,Sheet2!B:U,12,0),IF(B1=11,VLOOKUP(B2,Sheet2!B:U,13,0),IF(B1=12,VLOOKUP(B2,Sheet2!B:U,14,0),IF(B1=13,VLOOKUP(B2,Sheet2!B:U,15,0),IF(B1=14,VLOOKUP(B2,Sheet2!B:U,16,0),IF(B1=15,VLOOKUP(B2,Sheet2!B:U,17,0),IF(B1=16,VLOOKUP(B2,Sheet2!B:U,18,0),IF(B1=17,VLOOKUP(B2,Sheet2!B:U,19,0),IF(B1=18,VLOOKUP(B2,Sheet2!B:U,20,0),"")))))))))))))))))
 
Upvote 0
Welcome to the Forum!

Looks like this would give the required results?

=IF(AND(B1>=1,B1<=18),VLOOKUP(B2,Sheet2!B:U,B1+2,),"")
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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