#1   Report Post  
Posted to microsoft.public.excel.misc
tjh tjh is offline
external usenet poster
 
Posts: 96
Default Tab Reference

Is it possible to use an excel formula to reference the name of another
worksheet in the same file, without knowing the name of that worksheet. Such
as if you are on the first worksheet, and you want to list the names of all
the worksheets following the current worksheet . If there are five worksheet
and you would like to list the names of all the worksheet in cells A1 - A5
respectively.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Tab Reference

This UDF wil return the name of the ith sheet:

Function sheetname(i As Integer) As String
sheetname = Worksheets(i).Name
End Function

So =sheetname(1) will return the name of the first sheet, etc.
--
Gary''s Student - gsnu200761


"tjh" wrote:

Is it possible to use an excel formula to reference the name of another
worksheet in the same file, without knowing the name of that worksheet. Such
as if you are on the first worksheet, and you want to list the names of all
the worksheets following the current worksheet . If there are five worksheet
and you would like to list the names of all the worksheet in cells A1 - A5
respectively.

  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Tab Reference

First save your file....

Then, if you create a RANGENAME on each sheet, that is unique to that sheet,
no matter what the sheet name is, then you can put this formula in A1 of
Sheet1 and copy down, but must replace the rangename in each formula to
return the sheetname that contains the rangename..........

=MID(CELL("filename",RANGENAME1),FIND("]",CELL("filename",RANGENAME1),1)+1,99)

This in A2, etc
=MID(CELL("filename",RANGENAME2),FIND("]",CELL("filename",RANGENAME2),1)+1,99)


hth
Vaya con Dios,
Chuck, CABGx3



"tjh" wrote:

Is it possible to use an excel formula to reference the name of another
worksheet in the same file, without knowing the name of that worksheet. Such
as if you are on the first worksheet, and you want to list the names of all
the worksheets following the current worksheet . If there are five worksheet
and you would like to list the names of all the worksheet in cells A1 - A5
respectively.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Tab Reference

If you have a lot of sheets and
are positively allergic to VBA, you can
automate Chuck's excellent method thus:
Right-click on any tab Select all sheets
(Color all tabs to make the new selection obvious)
Enter Chuck's modified formula into A2:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,42)
Now all worksheets will show their tab name at A2.
With all tabs still selected, enter a 1 into A3.
Into A4 enter this formula:
=SUM('*'!A3)
Note that Excel expands this formula. Sample:
=SUM(SheetA:SheetM!A3,SheetO:SheetZ!A3)
Find !A3* Replace !A3) Replace All
Except for the Summary sheet, the first sheet,
the sheets will now have sequential numbers at A4.
(Page of Pages application?)
Change A4 on the Summary sheet to 0.
Select all sheets and enter at A1
="Page"&A4
Select A1:A2 and
Insert Name Create Top Row
On the Summary sheet at B1 enter and copy down:
=INDIRECT("Page"&ROW())
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
Nesting a sheet name reference within a cell reference??? Broyston Excel Discussion (Misc queries) 9 July 8th 08 08:35 PM
Changing sheet reference to cell reference TeeJay Excel Worksheet Functions 3 October 19th 07 11:50 AM
Formulas that reference cells that reference another cell Andrea Excel Discussion (Misc queries) 7 October 19th 06 08:14 AM
Row reference increment but preserve column reference Pwanda Excel Worksheet Functions 1 April 28th 05 01:12 PM
Macro to Reference Column Next to Current Reference dolphinv4 Excel Discussion (Misc queries) 2 April 11th 05 08:36 AM


All times are GMT +1. The time now is 07:12 PM.

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"