View Single Post
  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

You could create a workbook name, say NumSheets, with a refers to value of
=GET.WORKBOOK(4) , and then use =NumSheets in the worksheet. But be warned,
if you copy this cell in any Excel version prior to XL2002, it causes an
Excel crash. so I advise against it.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Vincdc" wrote in message
...
Thanks!
Just be curious, is there any built-in formula or function for this one? I
mean not the VBA code.


"Bob Phillips" wrote:

with VBA

Function WSNum()
WSNum = Activeworkbook.Worksheets.Count
End Function

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Vincdc" wrote in message
...
Hello:
Is there any function or other method to count the number of

worksheets in
a
workbook? I have a workbook which includes dozens of worksheets (each

for
one
client) and I would like to know the total number of clients.
Thanks in advance!