Forum Discussion

love_excel1948's avatar
love_excel1948
Copper Contributor
Oct 14, 2019

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

  • WBH1's avatar
    WBH1
    Copper 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), "="), "!")

  • Twifoo's avatar
    Twifoo
    Silver Contributor
    Try this:
    =IF(A34=“”,””,
    MAX(INDIRECT(“Client”&A34&
    “!C3:C33”)))