Placing the sheet's name in a cell

borolo222

New Member
Joined
Aug 18, 2009
Messages
42
Hi,

Is it possible to make a reference in a cell to the sheet's name?

I use a workbook with lots of sheets and i have to use their name inside the respective sheets.

thanks,

Emilio
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Would something like this work?

Code:
Function SheetName()

   SheetName = ActiveSheet.Name

End Function
 
Upvote 0
This is how you can pickup a sheet's name in a cell -

=MID(CELL("filename",A1),FIND("]",CELL("filename",A1),1)+1,LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1),1))

Then you can always use INDIRECT function along with concatenate or address to create a range and use it in the formula. Do you need help with that ?
 
Upvote 0
Thanks for your quick response. I'll give them a shot.

Tried the three of them and all worked. don't understand how that formula works, can you explain it to me please?

thanks
 
Last edited:
Upvote 0
Thanks for your quick response. I'll give them a shot.

Tried the three of them and all worked. don't understand how that formula works, can you explain it to me please?

thanks
=CELL("filename",A1)

tells you the "filename" of cell A1

ex:C:\Documents and Settings\User\My Documents\[Test.xls]Sheet1

the rest is just cropping that string to say just "Sheet1" by searching for "]"
 
Upvote 0

Forum statistics

Threads
1,214,874
Messages
6,122,034
Members
449,061
Latest member
TheRealJoaquin

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