Title: Using data from another sheet in a formula with sheet name in formula
Tags: if-statement;google-sheets;nested-if
Question: I'm writing a finance spreadsheet with google sheets and it works fine, except that I have to manually rewrite every entry in the formula to use the correct sheet. Is there a way to insert a variable in the following formula to make it read the sheet name from another cell?
=abs(SUMIFS('Feb21'!$I:$I;'Feb21'!$L:$L;D$2))
In the above formula, Feb21 is the sheet name that I'd like to be referenced by another cell.
I already tried indirect, but it just tells me that there's an error in the formula.

Here is the accepted answer: try INDIRECT:
=ABS(SUMIFS(INDIRECT(A1&amp;&quot;!I:I&quot;); INDIRECT(A1&amp;&quot;!L:L&quot;); D$2))
Comment for this answer: Worked like a charm. Thanks for your help!


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2021:00:12/16/21', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<if-statement><google-sheets><nested-if>', 'Title': 'Using data from another sheet in a formula with sheet name in formula', 'ViewCount': 62, 'id': 70378733, 'user_AboutMe': None, 'user_AccountId': 23665150.0, 'user_DisplayName': 'Giovanno', 'user_Reputation': 13.0, 'user_Views': 0.0, 'user_id': 17692707.0}}