Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save knu/642b6f3c3caa24dfc043dacca39d64cd to your computer and use it in GitHub Desktop.
Save knu/642b6f3c3caa24dfc043dacca39d64cd to your computer and use it in GitHub Desktop.
Excel formula to get the current sheet name
=RIGHT(CELL("filename"),LEN(CELL("filename"))-FIND("_"&REPT("]",LEN(CELL("filename"))-LEN(SUBSTITUTE(CELL("filename"),"]",""))),SUBSTITUTE(CELL("filename"),"]","_"&REPT("]",LEN(CELL("filename"))-LEN(SUBSTITUTE(CELL("filename"),"]",""))),(LEN(CELL("filename"))-LEN(SUBSTITUTE(CELL("filename"),"]",""))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment