Quizzes & Puzzles0 min ago
Worksheets in Excel
Does anybody know a way to count the number of worksheets in an Excel workbook by means of a function or a bit of simple VB code?
A need to count the number of worksheets provided in a weekly return and use that number in my analysis.
A need to count the number of worksheets provided in a weekly return and use that number in my analysis.
Answers
Best Answer
No best answer has yet been selected by New Judge. Once a best answer has been selected, it will be shown here.
For more on marking an answer as the "Best Answer", please visit our FAQ.First you will have to define this reference...
From the drop-down-menu Insert > Name > Define
In the �Names in Workbook� box type in the word Sheets
Then Copy & Paste this
=SUBSTITUTE(GET.WORKBOOK(1),"["&GET.WORKBOOK(16)&"]","")
into the �Refers to� box :
Click OK
Then in a blank cell anywhere in any worksheet enter this formula.
=COUNTA(Sheets)
That should do the trick for you.
Cheers,
BW
From the drop-down-menu Insert > Name > Define
In the �Names in Workbook� box type in the word Sheets
Then Copy & Paste this
=SUBSTITUTE(GET.WORKBOOK(1),"["&GET.WORKBOOK(16)&"]","")
into the �Refers to� box :
Click OK
Then in a blank cell anywhere in any worksheet enter this formula.
=COUNTA(Sheets)
That should do the trick for you.
Cheers,
BW