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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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
I have a similar situation as well, but in my case, I have a dropdown list for the work order for the first one, then looking up the Note number but limiting the dropdown list to just the cells that reference the job number, then output the Note information in the final cell.

In the pictures below, we have two different test to do on Work Order 4510. I need the Note Dropdown list to be just the Note #s associated with the Work Order (i.e. WO 4337 will only show Note 602 (*Pressure Test), Work Order 4510 will show Note #'s 3 (Pressure Test) and 17 (Leak Test) in the dropdown list.). Then in the Pressure Test Specifications, I need the Notes from the selected dropdown from Note # for that work order only.

One of the issues I have is that without the reference to the work order #, it will just populate the first note that meets the number. As i have 4 different work orders with the same Note #, it only pulls the first one.


Here is the formula from the "Pressure Test Specifications" box. =VLOOKUP(E2,'Data Sheet'!E2:F8,2,FALSE)


Work Order Dropdown
Work Order Dropdown.jpg



Note Dropdown:

Note Dropdown.jpg



Data sheet
1728494196488.png
 

Attachments

  • dropdown lists.JPG
    dropdown lists.JPG
    143.4 KB · Views: 2
Upvote 0
*Jake_E, welcome to the Forum!

These are referred to as "dependent dropdowns".

As you have Excel 365, they are quite simple to set up using the UNIQUE and FILTER functions, e.g. as explained here: Create a dynamic dependent drop down list in Excel an easy way

If you get stuck, please create a new thread. You're more likely to get responses that way than if you piggyback off a (not very related) existing thread.
 
Upvote 0

Forum statistics

Threads
1,223,868
Messages
6,175,082
Members
452,611
Latest member
bls2024

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