Function info()

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
 
P

Peo Sjoblom

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
 
J

JE McGimpsey

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

Do you have a hidden workbook, such as Personal.xls (Window/Unhide)?
 
P

Peo Sjoblom

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)
 

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.

Ask a Question

Top