Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to copy a sheet's formatting from one xls to another? | Excel Discussion (Misc queries) | |||
function to use sheet's name as variable | Excel Worksheet Functions | |||
how to get sheet's number it's name | Excel Discussion (Misc queries) | |||
Check if sheet's name is a number | Excel Discussion (Misc queries) | |||
Tab Name Shown In Another Sheet's Cell | Excel Discussion (Misc queries) |