← All how-to recipes

How to use a cell value as a sheet name (INDIRECT)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Pull from whichever tab a cell names — a dashboard that switches months by typing the tab name.

The formula

AppFormulaNotes
Excel (desktop)=INDIRECT(A1&"!B2")A1 holds the sheet name as text. Quote names with spaces: =INDIRECT("'"&A1&"'!B2").
Google Sheets=INDIRECT(A1&"!B2")Identical.
LibreOffice Calc=INDIRECT(A1&".B2")LibreOffice's native A1 syntax uses a dot; or force Excel-style with INDIRECT(ref,1).

How it works

INDIRECT turns a text string into a live reference, so building "Feb"&"!B2" and feeding it to INDIRECT reads B2 from the Feb tab — change A1 to "Mar" and the same formula reads the March tab instead. It powers month-switching dashboards and roll-ups over many identically-structured sheets. Two cautions: INDIRECT is volatile (recalculates constantly, slow in bulk) and its references don't auto-adjust when you insert rows/columns on the target sheet. LibreOffice's native syntax uses a dot (A1&".B2"), a real gotcha when porting. Verified by reading B2 from a real named tab.

Verified, not just documented

We ran =INDIRECT(A1&"!B2") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 555 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 555 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

INDIRECT — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes