Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 42
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate names on copied worksheet Pat Conover Links and Linking in Excel 0 March 20th 06 11:36 AM
Tracking worksheet names in functions locutus243 Excel Worksheet Functions 8 December 5th 05 08:56 PM
Can I link single cells in a spreadsheet to another worksheet? tywebb76 Excel Worksheet Functions 2 October 19th 05 04:05 PM
drop down menu containing worksheet names J-Rad Excel Worksheet Functions 3 February 1st 05 03:25 AM
How to link Excel worksheet tab names to dates in each worksheet? Pat Excel Worksheet Functions 9 January 31st 05 07:51 AM


All times are GMT +1. The time now is 08:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"