Function info()

  • Thread starter Thread starter Sonja
  • Start date Start date
S

Sonja

I have a workbook with 20 sheets. However, when I insert the function
info("numfile")
it returns 21. If I add another sheet it returns 22.

I have tried it on a new workbook with a couple of sheets and it returns
the correct answer so the problem seems to be specific to the original
workbook. Does anyone have any suggestions?

TIA,
-GHB
 
Mine returns over 30 with one workbook because I have
add-ins. Don't forget it returns "Number of active worksheets in the open
workbooks"

--


No private emails please, for everyone's
benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
Do you have a hidden sheet (Format/Sheet/Unhide)?

Do you have a hidden workbook, such as Personal.xls (Window/Unhide)?
 
You would need a macro

Sheets.Count

will count all sheets in a workbook. A simple macro might look like

Sub testme()
ActiveSheet.Range("A1").Value = ActiveWorkbook.Sheets.Count
End Sub

will return the number of sheets in A1
to install a macro see:

http://www.mvps.org/dmcritchie/excel/install.htm#install

once it is installed you can just run the macro by either do Alt + F8 and
double click the name or
assign it to a button


--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
Back
Top