Forum Discussion
Can I Use the VLOOKUP Formula to Return a Data Validation Drop Down List?
- Jan 06, 2021
No, you can't use VLookup, but you could still add data validation. The caveat is that you can't have user input and a lookup formula in the same cell, so you would need to add a column for user selection from the data validation list. Then, using an IF formula in the instructor field, you can perform a lookup when there is only one instructor, or pull from the user's selection from the data validation when there is more than one.
VLOOKUP only returns the first instance in the match. A better alternative is to create a new column in Table 1 that can be used a reference for future lookups. This can be a Unique ID for the courses.
Now when referencing Courses in Table 2, the Unique ID will always return the respective instructor even if the course list is repeated, since the Unique ID is unique. That is the essence of working with relational databases in Excel.
- NeilBostJan 05, 2021Copper Contributor
Thank you for your reply. I don't think your suggestion solves my problem, but what I'm hearing is VLOOKUP can't be used to return a whole data validation list. I'll just have to change each entry that had multiple possible instructors manually. Thank you again for your time.
- JMB17Jan 06, 2021Bronze Contributor
No, you can't use VLookup, but you could still add data validation. The caveat is that you can't have user input and a lookup formula in the same cell, so you would need to add a column for user selection from the data validation list. Then, using an IF formula in the instructor field, you can perform a lookup when there is only one instructor, or pull from the user's selection from the data validation when there is more than one.
- dholcombpaJul 11, 2021Copper Contributor
JMB17 Greetings, I am trying to do something similar. However, I don't need the vlookup column, because I always want the user to select an entry. But I want that data validation drop-down list to change based on a selection in the previous column as this one seems to do. I have changed the named formula (VersionList) to reflect the table and field names in my example, but I only get a message that the "Source currently evaluates to an error" I think it has something to do with my lack of understanding of how the $F12 reference in your named formula works. Can you tell what I am doing wrong?