BourBen
BourBen

Reputation: 11

Google Sheets: Dynamic Generated IMPORTRANGE formula

I have a drop down cell in column A with the names of the tabs of another workbook.
In column B, I will manually input a row #.

I want to use the worksheet name from Column A, and the row information from column B in a formula to look up information.

The formula I am currently using is:

=IMPORTRANGE("heresmyworkbookwebaddress", "Drink!A2")

What I am trying to do is: make it so that Drink is generated from the drop down menu cell, and the 2 from A2 is generated from the information contained in the cell from my B column. The A in A2 should always stay as A.

Is there any way to do this? Is there an easier way to pull information from another workbook?

Upvotes: 1

Views: 371

Answers (1)

Capt.Krusty
Capt.Krusty

Reputation: 627

Have you tried to concatenate the second part of your formula like this:

=IMPORTRANGE("heresmyworkbookwebaddress", *cellcontainingdropdown*&"A"&*B-cell*)

Instead of "cellcontainingdropdown" you enter the cell. Instead of "B-Cell" you insert the rownumber of column B that you need.

Depending on the format of your cell containing the workbook names you have to use "&!A&" instead of "&A&" if those are not used.

Upvotes: 1

Related Questions