If you are referring to a worksheets Index in the workbook, you can make use
of this UDF ...
Function SheetNum(Optional celRef As Range) As Long
With Application.Caller.Parent
If celRef Is Nothing Then
SheetNum = .Index
Else
SheetNum = celRef.Parent.Index
End If
End With
End Function
Enter as ...
=SheetNum()
or
=SheetNum(A1)
or
=SheetNum(Sheet2!A1)
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.