Count number of sheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have two questions. What is the limit on the number of sheets in a Excel
file? How can I count the number of sheets in a large worksheet?

Thanks,
JHL
 
In XL2003 and XL2007: Limited by available memory (default is 3 sheets)
You find this by searching Help with the term "specs"

This UDF will tell you how many worksheets (excludes chartsheets):
Function Sheetcount()
Sheetcount = Worksheets.Count
End Function

Call it with =SHEETCOUNT()
Need help with VBA: see David McRitchie's site on "getting started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm

There is also =INFO("numfile") but I am not sure what value it really gives!
best wishes
 
On my computer, about 5447 sheets.

This UDF give the number of sheets:

Function SheetCount() As Integer
Application.Volatile
SheetCount = Sheets.Count
End Function
 
Thank you Gary and Bernard

Gary''s Student said:
On my computer, about 5447 sheets.

This UDF give the number of sheets:

Function SheetCount() As Integer
Application.Volatile
SheetCount = Sheets.Count
End Function
 
Back
Top