ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sheet number (https://www.excelbanter.com/excel-discussion-misc-queries/46781-sheet-number.html)

Sheets number position

sheet number
 
how do i return the sheet number position. something that would return the
value of 3 if it is the third sheet in a workbook of 5 sheets.

JMB

you could use a user-defined function. insert a vba module in your workbook
and paste the following code:

Function SheetIndex() As Long
Application.Volatile True
SheetIndex = Application.Caller.Parent.Index
End Function

to use enter =sheetindex() into a cell.

"Sheets number position" wrote:

how do i return the sheet number position. something that would return the
value of 3 if it is the third sheet in a workbook of 5 sheets.



All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com