Search code examples
google-sheetsgoogle-sheets-formula

Change sheet name in a Transpose formula dynamically in Google Sheets


In my workbook, I have a summary sheet showing data from multiple customers and then one sheet per customer with all the details. In the summary sheet, Column A contains the names of the sheet for each customer. At the moment I have to hard code the name of the sheets like this:

=TRANSPOSE(SheetName!$C$4:$C$13)

How can I update the sheet name dynamically based on the values on column A?

PS: I'm using the transpose formula because in the individual sheets the values I want to bring to the summary sheet are all in a column but in the summary sheet I need them in a row.

I looked at this question, but does not work for me.


Solution

  • if you are working in google sheets, you can use indirect() function. Here is the code that will work for you.

    For getting sheet name automatically from column A cell:

    =TRANSPOSE(indirect(A1&"!$B$1:$C$13"))
    

    you can drag the same formula to get all the names further in column A.