Creating an Index

B

Bill Smith

Is there an automated way to create an Index worksheet for a large workbook?
I inherited a bunch of workbooks with a different product on each worksheet.
The only place the part number is listed is on the tab.
I'm part way thru manually creating a worksheet that lists the tab name and
links to the individual worksheets. It's much too time consuming. Any ideas
will be appreciated.
Thanks!
 
R

ryguy7272

It is quite easy with the small macro:

Sub ListSheets()
'list of sheet names starting at A1
Dim rng As Range
Dim i As Integer
Set rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(i, 0).Value = Sheet.Name
i = i + 1
Next Sheet
End Sub


Regards,
Ryan--
 
B

Bill Smith

ryguy7272 said:
It is quite easy with the small macro:

Sub ListSheets()
'list of sheet names starting at A1
Dim rng As Range
Dim i As Integer
Set rng = Range("A1")
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(i, 0).Value = Sheet.Name
i = i + 1
Next Sheet
End Sub


Regards,
Ryan--


Thanks Ryan. It worked great.
Is there anyway to also create the hyperlinks from the resulting sheet names
to each tab (worksheet)?
 
C

CLR

You're welcome.........I got that from an old Frank Kable post..........

Vaya con Dios,
Chuck, CABGx3
 
G

Gord Dibben

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top