count no of worksheet

B

Bob Phillips

This is VBA, so you need to go to the VB IDE (Alt-F11) and then either
- add it to a macro that you are writing
OR
- create a UDF that returns it if you want it in a worksheet function

Function NumSheets()
NumSheets = Application.Caller.Parent.Parent.Worksheets.Count
End Function


and add
=NumSheets()
in your worksheet
 
Top