Is there a Google Sheets formula to put the name of the sheet into a cell?

后端 未结 9 1356
轮回少年
轮回少年 2020-12-30 18:59

The following illustration should help:

9条回答
  •  时光说笑
    2020-12-30 19:08

    if you want to use build-in functions:

    =REGEXEXTRACT(cell("address";'Sheet1'!A1);"^'(.*)'!\$A\$1$")
    

    Explanation: cell("address";'Sheet1'!A1) gives you the address of the sheet, output is 'Sheet1'!$A$1. Now we need to extract the actual sheet name from this output. I'm using REGEXEXTRACT to match it by regex ^'(.*)'!\$A\$1$, but you can either use more/less specific regex or use functions like SUBSTITUTE or REPLACE

提交回复
热议问题