Sheet Name Function

G

Guest

Hi,

I am wanting to create a list of sheet names in a workbook on the first
sheet, and then assign each name in the list a hyperlink to go to that
particular sheet. Does anybody know a formula that I can use to set this up?

Thanks,

Jane
 
A

Arvi Laanemets

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.
 
K

Ken Johnson

Hi Jane,

See recent post for interesting discussion about this formula...

how to obtain sheet name?

Ken Johnson
 
K

Ken Johnson

I was hoping that would be a link.

Maybe this time..

how to obtain sheet name?

Ken Johnson
 
G

Guest

JaneC said:
I am wanting to create a list of sheet names in a workbook on the first
sheet, and then assign each name in the list a hyperlink to go to that
particular sheet. Does anybody know a formula that I can use to set this up?

You're looking to build a table of contents, I believe ..

One good way is Jim Cone's fine, free product (his XL Extras add-in) at his:
http://www.realezsites.com/bus/primitivesoftware/products.php

Scroll right down to the bottom of the page for the download link:
XL Extras - release 1.19 ... Download
A collection of additional features including...
**create table of contents with hyperlinks to each sheet

Jim's add-in will do exactly what you're looking for (and much more ..)
After installing, just click Insert > Table of Contents, then sit back
and watch his magic go to work <g> !

---
 
G

Guest

After installing, just click Insert > Table of Contents

The "Table of Contents" is a new menu item
which appears under the "Insert" dropdown

---
 

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