ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Workbook & worksheet name formulas (https://www.excelbanter.com/excel-discussion-misc-queries/54171-workbook-worksheet-name-formulas.html)

mikeburg

Workbook & worksheet name formulas
 

Is there a formula that obtains the workbook name that I can put in cell
A1?

Also,

Is there a formula that obtains the worksheet name that I can put in
cell A2?

Thanks so very much. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=482983


Peo Sjoblom

Workbook & worksheet name formulas
 
Workbook need to be saved

=SUBSTITUTE(MID(CELL("filename",B1),FIND("[",CELL("filename",B1))+1,255),"]"&MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,32),"")


for sheet


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



for path/name/sheet

=CELL("Filename",A1)

--
Regards,

Peo Sjoblom

(No private emails please)


"mikeburg" wrote in
message ...

Is there a formula that obtains the workbook name that I can put in cell
A1?

Also,

Is there a formula that obtains the worksheet name that I can put in
cell A2?

Thanks so very much. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile:
http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=482983



Gord Dibben

Workbook & worksheet name formulas
 
See Bob Phillips' site for this.

http://www.xldynamic.com/source/xld.xlFAQ0002.html


Gord Dibben Excel MVP

On Mon, 7 Nov 2005 17:20:14 -0600, mikeburg
wrote:


Is there a formula that obtains the workbook name that I can put in cell
A1?

Also,

Is there a formula that obtains the worksheet name that I can put in
cell A2?

Thanks so very much. mikeburg



mikeburg

Workbook & worksheet name formulas
 

Peo Sjoblom's vba works great!

One last request.

What formula would you recommend to show only the workbook name &
worksheet name in a cell (A3 or whatever) separated only by a hyphen -
. For example for a workbook named Payroll with a sheet named Rates:

Payroll-Rates

Thanks a million. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=482983


Peo Sjoblom

Workbook & worksheet name formulas
 
=formula1&" - "&formula2

where formula1 is the workbook name formula and formula 2 the worksheet name
formula


--

Regards,

Peo Sjoblom

"mikeburg" wrote in
message ...

Peo Sjoblom's vba works great!

One last request.

What formula would you recommend to show only the workbook name &
worksheet name in a cell (A3 or whatever) separated only by a hyphen -
For example for a workbook named Payroll with a sheet named Rates:

Payroll-Rates

Thanks a million. mikeburg


--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile:

http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=482983





All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com