Search code examples
google-sheetsgoogle-sheets-formula

is it possible to use a variable as a reverence when referring to another tab in google sheets


Sheet 1 (A) sheet 2 (B)
# of hours worked
Dec/20-Dec/25

I am trying to streamline the process of a timesheet, whose sheet has tabs that have the pay period dates in them. in order to reference to the tab, it would be easier to have the totals sheet have a variable for the tab name in each category.

Ex. a2!B1

instead of Sheet 2!b1


just a separate thing, if it were possible to have the tab name also be based on the list of the pay periods it would make the process even easier, although I don't think it is possible from my research


I tried to do 'a2'!b1 and it didn't work, I don't have extensive knowledge of Google Sheets, at least not yet, so I don't know any other way of putting it in where it might work.


Solution

  • You may try:

    =indirect(A2&"!B1")