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 using currently 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? Thanks ahead of time SheetsGods!

---------------Answer---------------

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.


Previous : Get data from database and write it back in again
Next : HTML Code:Invalid Data is being submitted