VLOOKUP across multiple sheets using dependent dropdown

Donutderek

New Member
Joined
Jun 19, 2019
Messages
22
Using a dependent dropdown, I have multiple values all with different source locations. I have used VLOOKUP to automatically populate a cell next to a drop-down.

=VLOOKUP(C13,'SheetX'!C5:D5000,2,FALSE)

However if I select B from the drop-down, how do I get VLOOKUP to do the same thing? The source info for B is on another sheet in another cell group. I've read it can be done with INDIRECT or INDEX/MATCH, but how to nest this formula is where I'm lost.

Any advice?
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
735
When you select "B" from the drop down, does that mean you're preforming the lookup on SheetB ?
 

Donutderek

New Member
Joined
Jun 19, 2019
Messages
22
Let's say my dropdown (C13) on Sheet1 contains apple, orange, and banana. "Apple" data is on Sheet2 C4:D500. "Orange" data is on Sheet2 G4:H500. "Banana" data is on Sheet3 E5:F500.

I'm attempting to populate D13 on Sheet1 with the adjacent data immediate to the cell right of my selection.
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
735
I have the drop-down in B13, the lookup value in C13 and the answer (this formula) in D13:

Code:
=VLOOKUP(C13,INDIRECT("Sheet"&B13&"!C5:D5000"),2,FALSE)
Just read your post and that wasn't my initial understanding. Let me think about it while I'm sure others are as well.
Will the dropdown have more than 3 items with different ranges? If so, would you consider having a "directory" that points out what the ranges are and sheets?
 
Last edited:

kweaver

Well-known Member
Joined
May 8, 2018
Messages
735
Assuming I (a) understand what you mean in previous post and (b) you can have a directory of sorts,
I put a "directory" in C15:D17

AppleSheetA!C4:D500
OrangeSheetA!G4:H500
BananaSheetB!E5:F500

<colgroup><col><col></colgroup><tbody>
</tbody>

Then, D13 looks like this:

Code:
=VLOOKUP(C13,INDIRECT(VLOOKUP(C13,C15:D17,2,FALSE)),2,FALSE)
Hope this helps as you adjust for your data and ranges.
 

Donutderek

New Member
Joined
Jun 19, 2019
Messages
22
Let me clarify:
I have a spreadsheet on Sheet 1. In cell A1 there is a dependent drop-down with selections Apple, Orange, Banana.
In Sheet2 the info for Apple is displayed from A1-B1. B2 value is the word "red"
In Sheet2 the info for Orange is displayed from E1-F1, F1's Value is orange.
In Sheet3 the info for Banana is displayed from C1-D1. D1 being yellow.

I want to select Apple from the drop-down menu (sheet 1, A1) and automatically populate B1 with the word Red.
Select Banana and have it populate B1 with Yellow.

It's fairly simple when the source info is all in one place, but given my source info is in different sheets, and I'm using one dropdown for all the selections, I lose sight of how the formula should be ordered.
 

kweaver

Well-known Member
Joined
May 8, 2018
Messages
735
Well, you can see my confusion?! You initially said the drop down was in C13. And you are now saying there are different ranges from what you said initially.

So, does Sheet2 in A1:B1 look like this?

AppleRed

<colgroup><col width="64" span="2"></colgroup><tbody>
</tbody>

And Sheet2 in E1:F1 look like this?

OrangeOrange

<colgroup><col width="64" span="2"></colgroup><tbody>
</tbody>

And Sheet3 in C1:D1 look like this?

BananaYellow

<colgroup><col width="64" span="2"></colgroup><tbody>
</tbody>

Then, Sheet1!B1 could be this?

Code:
=IF("Apple" = A1,Sheet2!B1, IF("Orange" = A1, Sheet2!F1,IF("Banana"=A1,Sheet3!D1,"No Fruit")))
 

Donutderek

New Member
Joined
Jun 19, 2019
Messages
22
So yes, the drop-down I'm using happens to be in C13, but the same concept would work if I change parameters to accommodate positioning. I gave you the example in A's and B's because I thought that would be easier to explain. I can tell I'm not making this easier.

=VLOOKUP(C13,'SheetX'!C5:D5000,2,FALSE)

If I use this formula, and I select "Apple" in the drop-down, it also automatically fills D13 with the coinciding value next to it.
As soon as I select Banana, it doesn't know where to find the coinciding information, because the formula is based on only the one selection. I want the formula to understand that no matter what I select, it will also fill D13 with whatever is coinciding next to that particular selected value.

Is that any better?!?!
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
8,889
Office Version
2007
Platform
Windows
You need something like this.
Search in a range on a sheet, if it does not exist, search on another sheet, if there is no search on another sheet.

=IFERROR(VLOOKUP(C13,Sheet2!C5:D5000,2,0),IFERROR(VLOOKUP(C13,Sheet2!E5:F5000,2,0),IFERROR(VLOOKUP(C13,Sheet2!G5:H5000,2,0),"Dont exists")))
 

Forum statistics

Threads
1,082,300
Messages
5,364,388
Members
400,796
Latest member
vrcdesktop

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top