Formula to Return Excel Sheet Name

KVASEY

New Member
Joined
Apr 10, 2006
Messages
11
=""&MID(CELL("filename",Sheet1!$A$1),FIND("]",CELL("filename",Sheet1!$A$1))+1,256)


1. Change filename to the your workbook's filename.
2. Change Sheet1 to your current sheetname where you have pasted the formula.



This formula below which I found on many forums doesn't really work because if you have it on 10 sheets and recalc, all 10 sheets will have the sheetname that is active.
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,255)
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
You need to add a cell reference (without the sheetname) to make it specific to each sheet

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
 
Last edited:

dotxl

New Member
Joined
Jun 21, 2015
Messages
10
This thread has long been dormant but I created a Name (ThisWS) in the Name Manager with the following formula in the "Refers to:" section: =MID(CELL("filename",INDIRECT("A1")),FIND("]",CELL("filename",INDIRECT("A1")))+1,255). Referring to ThisWS (as =ThisWS) in any sheet returns the sheet name of the sheet (not just the last sheet calculated). Hope this helps.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,355
Messages
5,595,680
Members
414,008
Latest member
SNesbyCarr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top