0

I have two Google Sheets: the first contains data per week and the second gives an overview of that data. The sheets in the first are named by week. For example: Week 1, Week 2, Week 3, Week 4 ... The sheets in the second contain one cell which has the same text as the sheet names of the first document. This cell is A1.

Using the IMPORTRANGE function I want to show some data from the first (data) document in the second (overview) document. Currently the IMPORTRANGE formula looks like this:

=IMPORTRANGE("https://docs.google.com/...; "Week 1!C2:C5")

As you can see I have to change the sheet name I reference to manually. I want it to change automatically using the text in cell A1. So it should look like this:

=IMPORTRANGE("https://docs.google.com/...; "A1!C2:C5")

Is it possible to do it like this or do I need a script and how can I make it work?

4

2 回答 2

0

当然,试试吧:

 =IMPORTRANGE("https://docs.google.com/..., A1)

我还建议您使用命名范围(google it)。这允许您在单元格 A1 中输入“week1”,而不是“Sheet3!A1:B343”。如果没有命名范围,任何复杂的电子表格都会将您的公式变成难以理解的混乱。

于 2015-04-29T11:12:18.037 回答
0

感谢您提供有关使用范围的提示,我将来会使用它。您建议使用以下公式:

=IMPORTRANGE("https://docs.google.com/...; A1)

它没有用。我让它使用以下公式:

=IMPORTRANGE("https://docs.google.com/..."; (A1&"!C2:C5"))
于 2015-04-29T20:14:10.563 回答