I want excel to retrive the name of the worksheet in a cell?

clausboss

Board Regular
Joined
Sep 13, 2005
Messages
71
Hi

I know that I can make =CELL("filename") to get the file name but if I only wante to retrive the sheet name in file is this possible.

:oops:

Claus
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Barry thanks

I had some problems but it gave me a idee have to make it..

=MID(CELL("filename");FIND("]";CELL("filename"))+1;100)

Many thanks
 
Upvote 0
how would you change Aladin's code to have the cell report the workbook name only?
 
Upvote 0
justme said:
how would you change Aladin's code to have the cell report the workbook name only?
I wouldn't.

I'd defined a named formula, WorkbookName and assign it the formula =Get.Workbook(16) Then in a cell you can just type =workbookname
 
Upvote 0
how do you define a named formula? I typed in =Get.workbook(16) and it said That function is not valid.
 
Upvote 0
Just like creating a named range, but instead of a range, you define a formula.

From the menu Insert | Name | Define... the name (WorkbookName) goes up top; formula (=Get.Workbook(16)) goes in the ReferTo box.
 
Upvote 0
oops, I didn't see your post.

May I assume I can pull the folder name the same way??
 
Upvote 0
Sorry, when you said "workbook name only" I took that to mean excluding the path. If you want the path, then just edit Aladin's formula to pull off the left, i.e.: <ul>[*]=LEFT(CELL("filename",A1),SEARCH("]",CELL("filename",A1)))[*]=LEFT(CELL("filename",A1),SEARCH("[",CELL("filename",A1))-1)[/list]
 
Upvote 0

Forum statistics

Threads
1,213,483
Messages
6,113,919
Members
448,533
Latest member
thietbibeboiwasaco

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