Get a Sheet Name using a named formula and get every Sheet/Tab name not the same name

drom

Well-known Member
Joined
Mar 20, 2005
Messages
543
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance!

if I put this formula in my activhesheet

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)​

I will get my activesheet name

If I create a name named "MyName" when my Activesheet is "France" like:

MyName =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))

Excel converts MyName
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))​
to
=MID(CELL("filename",France!A1),FIND("]",CELL("filename",France!A1))​


So in every Tab I get the shame answer when I put =MyName

France​


So is there any solution to avoid this?
If I am in a Sheet Named UKI and I put =MyName get UKI​
If I am in a Sheet Named Ireland and I put =MyName get Ireland​
If I am in a Sheet Named NESA and I put =MyName get NESA​
If I am in a Sheet Named Portugal and I put =MyName get Portugal​

Why I do not like to put in A1 = MID(CELL("filename",A1),FIND("]",CELL("filename",A1)) instead of =MyName

Because I am trying to know if is possible to create a dinamic formula to get a sheets Name using the same named formula
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
MyName: =MID(CELL("filename",!$A$1),FIND("]",CELL("filename",!$A$1))+1,255)
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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
Back
Top