# VLOOKUP across multiple sheets using dependent dropdown

#### Donutderek

##### New Member
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.

### Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

#### kweaver

##### Well-known Member
When you select "B" from the drop down, does that mean you're preforming the lookup on SheetB ?

#### Donutderek

##### New Member
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
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
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

 Apple SheetA!C4:D500 Orange SheetA!G4:H500 Banana SheetB!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)``

#### Donutderek

##### New Member
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
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?

 Apple Red

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

And Sheet2 in E1:F1 look like this?

 Orange Orange

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

And Sheet3 in C1:D1 look like this?

 Banana Yellow

<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
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
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")))

#### Donutderek

##### New Member
Oh Yaaaaaassssssss, Dante!
Thank you so much. This will work.