#1   Report Post  
Posted to microsoft.public.excel.misc
GP GP is offline
external usenet poster
 
Posts: 2
Default Tab Name

Hi,

I am wondering if it is possible to create a formula that will tell me
the name of a particular tab in a workbook. I have many tabs and I
would like to have a summary tab at the beginning that lists all of
the tab names in the book without actually having to type the names.
Any help would be appreciated.

Thx!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Tab Name

Private 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

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run or edit the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP


On Thu, 12 Jul 2007 09:08:28 -0700, GP wrote:

Hi,

I am wondering if it is possible to create a formula that will tell me
the name of a particular tab in a workbook. I have many tabs and I
would like to have a summary tab at the beginning that lists all of
the tab names in the book without actually having to type the names.
Any help would be appreciated.

Thx!


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



All times are GMT +1. The time now is 04:50 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"