ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   can a cell be automatically populated with the workbook name? (https://www.excelbanter.com/excel-worksheet-functions/154139-can-cell-automatically-populated-workbook-name.html)

crawdood

can a cell be automatically populated with the workbook name?
 
I have a workbook with more than 50 worksheets; iwould like a cell in each
worksheet to automatically dispaly the tab name of that worksheet - is this
possible?

Mike H

can a cell be automatically populated with the workbook name?
 
Try this,

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

Mike

"crawdood" wrote:

I have a workbook with more than 50 worksheets; iwould like a cell in each
worksheet to automatically dispaly the tab name of that worksheet - is this
possible?


David Biddulph[_2_]

can a cell be automatically populated with the workbook name?
 
Assuming that you mean worksheet name, as in the text of your message, and
not workbook name, as in the subject line, then:
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)
Note that you need to save the file before this will take effect.
--
David Biddulph

"crawdood" wrote in message
...
I have a workbook with more than 50 worksheets; iwould like a cell in each
worksheet to automatically dispaly the tab name of that worksheet - is
this
possible?




Gord Dibben

can a cell be automatically populated with the workbook name?
 
Also note that you can group the sheets and enter the formula in a cell on the
active sheet.

Will be entered in that cell on all sheets.


Gord Dibben MS Excel MVP

On Tue, 14 Aug 2007 16:00:05 +0100, "David Biddulph" <groups [at]
biddulph.org.uk wrote:

Assuming that you mean worksheet name, as in the text of your message, and
not workbook name, as in the subject line, then:
=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)
Note that you need to save the file before this will take effect.



ryguy7272

can a cell be automatically populated with the workbook name?
 
Mike and David supplied some great suggestions for you. In addition, you may
also want to try this:

Sub ListSheets()
Dim rng1 As Range
Dim I As Integer
Dim sh As Worksheet
Dim blnReplace As Boolean
Set rng1 = Range("A3")
For Each Sheet In ActiveWorkbook.Sheets
blnReplace = False
rng1.Offset(I, 0).Value = Sheet.Name
I = I + 1
Next Sheet
End Sub

Write back if you have any questions...

--
RyGuy


"crawdood" wrote:

I have a workbook with more than 50 worksheets; iwould like a cell in each
worksheet to automatically dispaly the tab name of that worksheet - is this
possible?



All times are GMT +1. The time now is 10:32 AM.

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