Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Extracting Worksheet names within a spreadsheet
Is it possible to extract the name of all the worksheets within a spreadsheet.
On a monthly basis I have a spreadsheet that have a worksheets added. I need to identify which worksheets are new. In a nutshell I require a contents page on the first worksheeting listing what all the worksheet names are with the spreadsheet. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Extracting Worksheet names within a spreadsheet
You would have to use VBE: Sub SheetList() For Each ws In Worksheets i = i + 1 Cells(i, 1) = ws.Name Next End Sub -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566968 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Extracting Worksheet names within a spreadsheet
Hi
Create an UDF (Activate VBA editor pressing Alt+F11, insert a new module when there is no one in your workbook, and copy the code below into it). Public Function TabI(TabIndex As Integer, Optional parVolatile As Date) As String TabI = Sheets(TabIndex).Name End Function On sheet you want to have the list of sheets in, into cell A1 enter the formula =IF(ISERROR(TABI(ROW(),NOW())),"",TABI(ROW())) , and copy it down for some number of rows. In case you want a heading for sheets list in cell A1, enter the modified formula into cell A2 =IF(ISERROR(TABI(ROW()-1,NOW())),"",TABI(ROW()-1)) , and again copy it down. -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Sunny" wrote in message ... Is it possible to extract the name of all the worksheets within a spreadsheet. On a monthly basis I have a spreadsheet that have a worksheets added. I need to identify which worksheets are new. In a nutshell I require a contents page on the first worksheeting listing what all the worksheet names are with the spreadsheet. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Extracting Worksheet names within a spreadsheet
The free Excel add-in "XL Extras" will do that.
Plus it will sort the workbook sheets and do other stuff. Download from ... http://www.realezsites.com/bus/primitivesoftware No registration required. -- Jim Cone San Francisco, USA "Sunny" wrote in message Is it possible to extract the name of all the worksheets within a spreadsheet. On a monthly basis I have a spreadsheet that have a worksheets added. I need to identify which worksheets are new. In a nutshell I require a contents page on the first worksheeting listing what all the worksheet names are with the spreadsheet. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Extracting Worksheet names within a spreadsheet
Thank you all for your responses.
Much Appreciated "Sunny" wrote: Is it possible to extract the name of all the worksheets within a spreadsheet. On a monthly basis I have a spreadsheet that have a worksheets added. I need to identify which worksheets are new. In a nutshell I require a contents page on the first worksheeting listing what all the worksheet names are with the spreadsheet. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Extracting Worksheet names within a spreadsheet
This works. Exactly what I wanted.
Thanks a lot saved a lot of hassle. Sunny "raypayette" wrote: You would have to use VBE: Sub SheetList() For Each ws In Worksheets i = i + 1 Cells(i, 1) = ws.Name Next End Sub -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566968 |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Location for registering all the Worksheet names of a workbook
Dear Helpers,
I need to extract all the worksheet names in a summary worksheet. I copied the following VBA from the Office Discussion Groups Q & A Quote Sub SheetList() For Each ws In Worksheets i = i + 1 Cells(i, 1) = ws.Name Next End Sub €“ by Mr Raypayette Unquoted The above vba works well but always have the result located at A1. Is it possible to put it to B3 or any designated cell I choose. Thanks in advance Fanny "raypayette" wrote: You would have to use VBE: Sub SheetList() For Each ws In Worksheets i = i + 1 Cells(i, 1) = ws.Name Next End Sub -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566968 |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Location for registering all the Worksheet names of a workbook
And in B3:
Sub SheetList() dim i as long for i = 1 to worksheets.count activesheet.cells(i+2,"B").value = "'" & worksheets(i).name next i end sub Sometimes plopping the worksheet name into a cell isn't enough. You'll want to stop excel from parsing the entry. The "'" will treat the cell's value as text. It would affect worksheets with names like: 000001 January 1, 2007 1.120000 Fanny wrote: Dear Helpers, I need to extract all the worksheet names in a summary worksheet. I copied the following VBA from the Office Discussion Groups Q & A Quote Sub SheetList() For Each ws In Worksheets i = i + 1 Cells(i, 1) = ws.Name Next End Sub €“ by Mr Raypayette Unquoted The above vba works well but always have the result located at A1. Is it possible to put it to B3 or any designated cell I choose. Thanks in advance Fanny "raypayette" wrote: You would have to use VBE: Sub SheetList() For Each ws In Worksheets i = i + 1 Cells(i, 1) = ws.Name Next End Sub -- raypayette ------------------------------------------------------------------------ raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569 View this thread: http://www.excelforum.com/showthread...hreadid=566968 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Duplicate names on copied worksheet | Links and Linking in Excel | |||
Tracking worksheet names in functions | Excel Worksheet Functions | |||
Can I link single cells in a spreadsheet to another worksheet? | Excel Worksheet Functions | |||
drop down menu containing worksheet names | Excel Worksheet Functions | |||
How to link Excel worksheet tab names to dates in each worksheet? | Excel Worksheet Functions |