Forum Discussion
love_excel1948
Oct 14, 2019Copper Contributor
Excel formula to get sheet name from a cell
I am trying to use a formula to reference a worksheet by getting the sheet name from a cell as shown below
=IF(A34="","",MAX(Client10!C$3:C$33))
I have about 50 sheets and want to sect the sheet depending on the row. I have tried to use CONCAT to build the sheetname but cannot get it to work in the formula.
All the sheets start with Client and column A contains a number which needs to be added to Client to give me the sheetname.
6 Replies
- WBH1Copper Contributor
You can get sheet names from one sheet to another with an easy formula...
on sheet1 have a formula in cell a1 that includes the sheet name reference: =Sheet1!B1
=TEXTBEFORE(TEXTAFTER(FORMULATEXT(sheet1!a1), "="), "!")
- SergeiBaklanDiamond Contributor
That could be like
MAX(INDIRECT("Client" & A1 & "!C$3:C$33"))for the second part of the formula.
- love_excel1948Copper ContributorMany thanks this has worked.
- TwifooSilver ContributorTry this:
=IF(A34=“”,””,
MAX(INDIRECT(“Client”&A34&
“!C3:C33”)))- love_excel1948Copper ContributorMany thanks for this. It has worked a treat.
- TwifooSilver ContributorYou’re welcome.