Printing Sheet's Name
I have a spreadsheet with a lot of sheets and wanted to know
Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
1. Insert a new sheet and name it SheetList
2. Press ALT-F11 to open VB Editor 3. Click Insert|Module 4. Paste the code below Sub sheetList() Dim i As Integer i = 1 For Each ws In Worksheets Sheets("SheetList").Cells(i, 1).Value = ws.Name i = i + 1 Next End Sub 5. Press F5 You will get the list in the new sheet... (including SheetList) Press the "Gingit" wrote: I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
Sheeloo,
After I press F5 it gave me a run time error subscript out of range. Thanks. "Sheeloo" wrote: 1. Insert a new sheet and name it SheetList 2. Press ALT-F11 to open VB Editor 3. Click Insert|Module 4. Paste the code below Sub sheetList() Dim i As Integer i = 1 For Each ws In Worksheets Sheets("SheetList").Cells(i, 1).Value = ws.Name i = i + 1 Next End Sub 5. Press F5 You will get the list in the new sheet... (including SheetList) Press the "Gingit" wrote: I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
How many sheets do you have?
Change Dim i As Integer to Dim i As Long and try "Gingit" wrote: Sheeloo, After I press F5 it gave me a run time error subscript out of range. Thanks. "Sheeloo" wrote: 1. Insert a new sheet and name it SheetList 2. Press ALT-F11 to open VB Editor 3. Click Insert|Module 4. Paste the code below Sub sheetList() Dim i As Integer i = 1 For Each ws In Worksheets Sheets("SheetList").Cells(i, 1).Value = ws.Name i = i + 1 Next End Sub 5. Press F5 You will get the list in the new sheet... (including SheetList) Press the "Gingit" wrote: I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
Use this formula to show the sheet name.
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99) advantage: no macro is required here disdvantage: will not show the name properly till the file is saved. -- Kind Regards, Satti Charvak Only an Excel Enthusiast Noida, India "Gingit" wrote: Sheeloo, After I press F5 it gave me a run time error subscript out of range. Thanks. "Sheeloo" wrote: 1. Insert a new sheet and name it SheetList 2. Press ALT-F11 to open VB Editor 3. Click Insert|Module 4. Paste the code below Sub sheetList() Dim i As Integer i = 1 For Each ws In Worksheets Sheets("SheetList").Cells(i, 1).Value = ws.Name i = i + 1 Next End Sub 5. Press F5 You will get the list in the new sheet... (including SheetList) Press the "Gingit" wrote: I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
Other solution: install the ASAP UTILITIES!!!
Have a Google on internet en download free! Have fun! -- met vriendelijke groetjes "Gingit" schreef in bericht ... I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
For the macro,
Sheeloo's answer was good I've just removed the sheet name and it should work properly now., Sub sheetList() Dim i As Integer i = 1 For Each ws In Worksheets Cells(i, 1).Value = ws.Name i = i + 1 Next endsub Now. press f5 to execute the macro -- Kind Regards, Satti Charvak Only an Excel Enthusiast Noida, India "Satti Charvak" wrote: Use this formula to show the sheet name. =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,99) advantage: no macro is required here disdvantage: will not show the name properly till the file is saved. -- Kind Regards, Satti Charvak Only an Excel Enthusiast Noida, India "Gingit" wrote: Sheeloo, After I press F5 it gave me a run time error subscript out of range. Thanks. "Sheeloo" wrote: 1. Insert a new sheet and name it SheetList 2. Press ALT-F11 to open VB Editor 3. Click Insert|Module 4. Paste the code below Sub sheetList() Dim i As Integer i = 1 For Each ws In Worksheets Sheets("SheetList").Cells(i, 1).Value = ws.Name i = i + 1 Next End Sub 5. Press F5 You will get the list in the new sheet... (including SheetList) Press the "Gingit" wrote: I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
Printing Sheet's Name
Thank you all it worked great!!!
"Frederik" wrote: Other solution: install the ASAP UTILITIES!!! Have a Google on internet en download free! Have fun! -- met vriendelijke groetjes "Gingit" schreef in bericht ... I have a spreadsheet with a lot of sheets and wanted to know Is there anyway to print only the sheet names Thanks. |
All times are GMT +1. The time now is 12:07 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com