Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to quickly count the number of all opened workbooks?

Sometimes, you may open multiple workbooks at the same time for working. But have you ever imaged to count the number of all opened workbooks? In this article, I introduce some tricks on counting opened workbooks and sheets in active workbook.

Count the number of opened workbooks with VBA

Count the number of sheets in active workbook with Kutools for Excel good idea3


Navigation Pane -- Workbook & Sheet (view all open workbooks are list, and all sheets of the current workbook are list in the pane, you can click the sheet name to switch to it.)

doc navigation list sheet

arrow blue right bubble Count the number of opened workbooks with VBA


To count the number of opened workbooks, here is a macro code to help you.

1. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below code to the blank script. See screenshot:

Code: Count number of opened workbooks.

Sub CountBooks()
      MsgBox Workbooks.Count
End Sub

doc count number of opened workbook 1

3. Press F5 key to run the code, a dialog pops out to remind you the number of opened workbooks.
doc count number of opened workbook 2


arrow blue right bubble Count the number of sheets in active workbook with Kutools for Excel

To count the number of workbooks is used rarely in Excel work, in most cases, you may want to count the number of sheets in the active workbook. To solve this job quickly, you can display Kutools for Excel’s Navigation pane.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

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

Click Kutools > Navigation to enable the Navigation pane, and then click Workbook & sheet icon doc icon to expand the pane. Now you can view all opened workbooks in the upper part of pane, and select one workbook, the relative sheets names are listing in the bottom part of the pane, and the number of the sheets is displayed at the bottom. See screenshot:
doc count number of opened workbook 3

doc download 1



Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.