Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get the sheet name in a cell? (I have more than one sheet, I want to get the current on each sheet)

share|improve this question
up vote 7 down vote accepted

Microsoft explains you might need to use an array formula to get the sheet name:

To display the name of the current worksheet, type the following formula as an array formula


where "filename" is literally the word "filename", in quotation marks.

NOTE: You must input this formula as an array formula. To input a formula as an array formula, press CTRL+SHIFT+ENTER.

Also note that this is very platform dependent. On a Mac, you'll need different formulas, as it uses different path separators. Also, it might work differently in and other alternatives. And when using on an unsaved workbook, you might get #VALUE! instead.

When not using an array formula, you might get the name of the workbook (the last part of its file name), like so:

To return the name of the workbook only, like used in the following formula:

share|improve this answer

Here's a formula.


(Link to more info)

share|improve this answer
Note that the reference to "A1" is not needed. Also, note that this is not platform independent, and that the formula might remain blank until you save the workbook. See also – Arjan Dec 7 '10 at 19:29
If I put this in two worksheets it will have the same name in both. It doesn't get the current worksheet where the cell is in. It gets the current worksheet I am viewing and replicate the value on all other fields in all other worksheets. – BrunoLM Dec 8 '10 at 12:36

First save your file than enter this formula anywhere

share|improve this answer
+ This does work and is short. On a side note: In german Excel use =RECHTS(ZELLE("dateiname");LÄNGE(ZELLE("dateiname"))-FINDEN("]";ZELLE("dateinam‌​e"))) – nixda Nov 18 '14 at 12:05
In my case I needed to use ; instead of , when separating the elements of a function – WoJ Nov 5 '15 at 14:23

On LibreOffice, I've mixed your formula into the following, and the number 20 towards the end will be the limit on the characters that will be displayed:


share|improve this answer
This is for MS Excel. – KronoS Jul 25 '12 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .