I am looking for a formula to place within each worksheet to identify the sequence number of that worksheet.
For example, if I have a workbook containing four worksheets named "Start", "Alpha", "Beta", and "End" I want a formula within the "Alpha" worksheet that contains a workbook tab number of 2 since it is the second worksheet within the workbook.
My preference is not to use VBA or a macro but I will accept any help.
Thanks, Dell.
Last edited by dellschipper; 10-05-2011 at 02:59 PM.
Make a list of all the worksheets in a column of any sheet.. then name that range by typing in the Name box to the left of the formula bar... e.g. TabNames.
Then try:
=MATCH(MID(CELL("filename",$A$1),FIND("]",CELL("filename",$A$1))+1,255),TabNames,0)
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
what is the list of sheet is variable?
Insert the sheet name into the list at appropriate position.
Please continue correspondence in your own thread.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Well, the number of worksheets is variable and my intent was to produce the table rather than start with the table. I was planning on using a SUMIF formula going from "Start:End" and matching the workbook tab number with a sequential list to populate the table.
I think if you will need VBA udf then...
Perhaps...
in any sheet type =Sheetnum() to get active sheetnumberFunction Sheetnum() For i = 1 To sheets.Count If ActiveSheet.Name = sheets(i).Name Then Sheetnum = i End If Next i End Function
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Different approach based on the Named Formula "sheetnumber", wich in turn uses "GET.DOCUMENT(87)" .
What is Get.Document(87)?
I found description here:
http://xcell05.free.fr/morefunc/engl...e.document.htm
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks