Log in  \/ 
x
or
x
x
Register  \/ 
x

or

Kutools for Excel 22.00 HOT

300+ Powerful Features You Must Have in Excel

Kutools-for-Excel

Kutools for Excel is a powerful add-in that frees you from performing time-consuming operations in Excel, such as combine sheets quickly, merge cells without losing data, paste to only visible cells, count cells by color and so on. 300+ powerful features / functions for Excel 2019, 2016, 2013, 2010, 2007 or Office 365!

Read More Download Buy now

Office Tab 14.00HOT

Adding Tabbed Interface for Office

Office Tab

It enables tabbed browsing, editing, and managing of Microsoft Office applications. You can open multiple documents / files in a single tabbed window, such as using the browser IE 8/9/10, Firefox, and Google Chrome. It's compatible with Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365. Demo

Read More Download Buy now

Kutools for Outlook 13.00NEW

100+ Powerful Features for Outlook

Kutools-for-Outlook

Kutools for Outlook is a powerful add-in that frees you from time-consuming operations which majority of Outlook users has to perform daily! It can save your time from using Microsoft Outlook 2019, 2016, 2013, 2010 or Office 365!

Read More Download Buy now

Kutools for Word  9.00NEW

100+ Powerful Features for Word

Kutools-for-Word

Kutools for Word is a powerful add-in that frees you from time-consuming operations which majority of Word users have to perform daily! It can save your time from using Microsoft Word / Office 2019, 2016, 2013, 2010, 2007, 2003 or Office 365!

Read More Download Buy now

Classic Menu for Office

Bringing Back Your Familiar Menus

Restores the old look and menus of Office 2003 to Microsoft Office 2019, 2016, 2013, 2010, 2007 or Office 365. Don’t lose time in finding commands on the new Ribbon. Easy to deploy to all computers in enterprises and organizations.

Read More Download Buy now

How to count the number of sheets of a workbook?

Have you ever considered how to count the number of worksheets in a workbook? To count them one by one is a boring job, if there are lots of worksheets. In fact, there is no straight formula to calculate the number of worksheets. But, here, I can introduce you some useful and handy tricks to deal with this problem.

Count the number of sheets in a workbook with Define Name command

Count the number of sheets in a workbook with VBA code

Show the number of sheets in a workbook by Navigation pane good idea3

Count the number of sheets in a workbook by creating a list of sheets good idea3


arrow blue right bubbleCount the number of sheets in a workbook with Define Name command

In Excel, you can apply a formula into the Define Name feature first, and then count the number of the worksheets.

1. Launch your workbook which you want to count the number of worksheets.

2. Click Formula > Define Name, see screenshot:

doc-count-number-of-sheets1

3. And in the New Name dialog box, specify a name in the Name text box, and then enter this formula =GET.WORKBOOK(1)&T(NOW()) to the Refers to text box, see screenshot:

doc-count-number-of-sheets1

4. Then click OK to close this dialog, and return to the worksheet, then type this formula =COUNTA(INDEX(CountSheets,0))(CountSheets in this formula is the name you defined in step 3, you can change it as you need.) into a blank cell, see screenshot:

doc-count-number-of-sheets1

5. And press Enter key, you will get the number of your worksheets in the current workbook.

doc-count-number-of-sheets1


arrow blue right bubbleCount the number of sheets in a workbook with VBA code

If you think the above formulas are somewhat hard to remember, here is a simple VBA code also can help you.

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Count the number of sheets in a workbook

Public Sub CountWorkSheets()
'Update 20140326
MsgBox "The total number sheets of this workbook: " & Application.Sheets.Count
End Sub

3. Then press F5 key to execute this code, and a prompt box will pop out to tell you the total number of the worksheets as following screenshot shown:

doc-count-number-of-sheets1


arrow blue right bubble Show the number of sheets in a workbook with Navigation pane

If you have Kutools for Excel installed, you can obviously view the number of sheets in a workbook with the Navigation pane.

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

1. Click Kutools > Navigation to enable the Navigation pane in left of the worksheet. See screenshot:
doc navigation 1

2. Then click Workbook & Sheets tab, and then you can view the total number of sheets in the active workbook is shown in the bottom of the pane, also you can view the number of visible and hidden sheets of the workbook. See screenshot:
doc navigation 2

With Navigation pane, you can toogle between sheets, display all column headers, range names, and add auto texts and so on. Click here to know more details.

arrow blue right bubble Navigation  pane --  List and Count All Sheets


arrow blue right bubble Count the number of sheets in a workbook by creating a list of sheets

If you think of above methods are not convenient, I can introduce a round-way for you.

If you have installed Kutools for Excel, you can create a name list of all worksheets, then select them to count in the Status bar.

After free installing Kutools for Excel, please do as below:

1. Enable the workbook you want to count its worksheets, and click Kutools Plus > Worksheet > Create List of Sheet Names. See screenshot:
doc navigation 1

2. Then in the popping dialog, check Contains a list of hyperlinks option, and for selecting sheet names conviniently, you can display the sheet index in 3 or 4 columns. See screenshot:
doc count sheets 2

3. Click Ok, then a worksheet is created with all sheets’ names before all sheets, and you just need to select these sheet names, and view the counting result at the Status bar.
doc kutools create list of sheet names 3

Actually, these sheet names are linkable, you can click one sheet name, and then quickly link to the relative sheet. And with Create List of Sheet Names, you can create linkable buttons of sheet names by check Contains buttons and macros option . Click here to know more about Create List of Sheet Names.

arrow blue right bubble Create list of Sheet Names



Kutools for Excel: 300 + functions you must have in Excel, 30-day free trial from here

goodNavigation pane -- Find and Replace

Kutools for Excel's advanced Find and Replace function, can help you find and
replace a value across multiple sheets and workbooks.
doc find and replace

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    ro · 1 years ago
    =sheets() works great
    • To post as a guest, your comment is unpublished.
      Vishal · 1 years ago
      It Works only 2010 & Higher Version of Excel. Not Working In Excel 2007
      • To post as a guest, your comment is unpublished.
        carla · 11 months ago
        Tried it on my 2007 version.
        =COUNTA(countsheets)
        works for me.
  • To post as a guest, your comment is unpublished.
    Ahmad · 3 years ago
    I like it. Thanks too much
  • To post as a guest, your comment is unpublished.
    Linda · 3 years ago
    Thank you so much for posting these directions!! I have a workbook with over 700 sheets and never knew there was a way for excel to count them for me. I used the first method and it worked absolutely perfectly!!
  • To post as a guest, your comment is unpublished.
    Fahad Anwar · 4 years ago
    Great! Saved so much of my time!!
  • To post as a guest, your comment is unpublished.
    cdavis · 4 years ago
    Hi, Thanks! This worked for me great in excel 2013 to count the number of sheets. Crazy that a formula is required to do this.
  • To post as a guest, your comment is unpublished.
    smith · 5 years ago
    Sorry Freddy. Your first method using Formula > Define Name doesn't work. You got a typo somewhere or something
    • To post as a guest, your comment is unpublished.
      Mariana · 4 years ago
      [quote name="smith"]Sorry Freddy. Your first method using Formula > Define Name doesn't work. You got a typo somewhere or something[/quote]

      yes, instead of =COUNTA(INDEX(CountSheets,0))
      You should write =COUNTA(INDEX(CountSheets;0))
  • To post as a guest, your comment is unpublished.
    Saulo Garcia · 5 years ago
    To count the total of sheets in the same workbook, just go to Formula > Define Name and create a formula like CountSheets = GET.WORKBOOK(4). Type_Num 4 = The number of sheets in the workbook.

Feature Tutorials