Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9704

How do I reference a cell for the sheet name in IMPORTRANGE function in Google Sheets when the sheet is in another workbook?

$
0
0

I have two workbooks with several sheets in each. I have a dropdown to select the sheet name that I'm using for reference for URLs and to reference other sheets in the main book.

I successfully used IMPORTRANGE to get data from the other workbook when I put the sheet name in it.

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/12Up9RK9bveEPN35iXq3V1QouJMgXELgzzoOdLnID5lU/edit?usp=sharing", "AMT!B2:M8")

AMT needs to be replaced with the value from another cell.

I've referenced cells in other sheets using INDIRECT

, but not sure how to do it in this case in this particular string.

I've tried doing it a number of different ways, and this is my most recent attempt

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/12Up9RK9bveEPN35iXq3V1QouJMgXELgzzoOdLnID5lU/edit?usp=sharing", "INDIRECT("'"&D4&"'!B2:M8")")

Viewing all articles
Browse latest Browse all 9704

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>