Specifying the Number of Worksheets in a New Workbook

Written by Allen Wyatt (last updated May 18, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


1

Whenever Denise creates a new workbook, Excel always creates it with three worksheets. She seldom (if ever) uses three worksheets in a workbook, so she deletes the extras. This is a bit bothersome to Denise, so she wonders if there is a way to tell Excel that she only wants one or two worksheets when she creates a workbook.

The short answer is yes, there is a way—and it is quite simple. Before explaining how this is done, though, Denise should be commended on making sure that her workbooks contain only the number of worksheets needed for the data contained therein. (It can be a bother to have extraneous, empty worksheets in a workbook!)

In order to adjust the number of worksheets in a new workbook, follow these steps:

  1. Display the Excel Options dialog box. (In Excel 2007 click the Office button and then click Excel Options. In Excel 2010 or a later version display the File tab of the ribbon and then click Options.)
  2. At the left side of the dialog box click General. (If you are using Excel 2007, click the Popular option instead.) (See Figure 1.)
  3. Figure 1. The General options of the Excel Options dialog box

  4. Adjust the value shown in the Include this Many Sheets control.
  5. Click on OK.

That's it; the next time you start Excel (or the next time you create a new workbook from within Excel), it will only include the number of worksheets you specified in step 3.

There is a different, lesser-known method you could use for specifying how many worksheets you want in a new workbook—you could create your own workbook template that has the desired number of worksheets. You could also apply any "default formatting" you want to the workbook and the worksheets. When you then create a workbook based on the template, it will be created using the template as a pattern for the new workbook.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (958) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Applying Formatting in Lists

If you want to change the formatting applied to numbers or bullets in your lists, you'll appreciate the information in ...

Discover More

Determining an Integer Value

When creating macros, you often need to process numbers in various ways. VBA allows you to convert a numeric value to an ...

Discover More

Who Has the Workbook Open?

When you are working with workbooks to which multiple people have access, it can be helpful to know who has a particular ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Moving from Sheet to Sheet

Need to move quickly through the worksheets in a workbook? Learn the keyboard shortcuts and you can make short work of ...

Discover More

Creating Worksheets from a List of Names

Need to create a large number of worksheets using specific names? If so, you'll love the ideas presented in this tip.

Discover More

Referencing a Worksheet Name

Excel provides ways to reference the column or row number of a cell, but it doesn't provide a built-in way to reference a ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2018-08-25 06:10:32

Graham

I had this problem when I worked for a multi-national company and received sales data from over 20 marketing countries.

Often the files contained the default number of worksheets, usually 3, although only Sheet 1 contained the required data.
Sometimes the extra sheets contained useful data and sometimes they were HIDDEN !!

It was a time consuming task to check all of the extra worksheets manually, so I wrote a macro to do this automatically, see below.
At that time I was only interested in normal cell 'data', so the macro does not check for inserted comments, objects, pictures, etc.

I wrote this macro in the 1990s, so probably Excel 95. It still works for Excel 2010.
Since that time I have always started workbooks with only 1 worksheet, more can be added later if needed.

Sub EmptyWorksheets()

'Works in all situations, including for worksheets that have had data deleted BEFORE workbook is saved.
'Searches all worksheets in the currently active workbook, including HIDDEN worksheets.

'Note a cell is NOT empty if the cell contains a formula, even if the formula result is "".
'However, a cell IS empty if it ONLY has an attached comment, object or picture, etc.

Dim foundsheet, lastcell, countvalue, allcells

For Each foundsheet In Worksheets
lastcell = foundsheet.Cells.SpecialCells(xlLastCell).Address
'lastcell may have an higher value than expected if :-
'An empty cell has an attached comment (The cell is used, but defined as EMPTY by this macro).
'Some data has been deleted, but the workbook has not been SAVED, since
'the xlLastCell value is only reset to a LOWER value when the workbook is saved.
'However the xlLastCell value is automatically INCREASED if data is added to new columns/rows

allcells = "$A$1:" & lastcell
'Defines range of cells that may contain data.

countvalue = Application.WorksheetFunction.CountA(Worksheets(foundsheet.Name).Range(allcells))
'CountA function finds cells that contain data.

If countvalue = 0 Then 'No cells in use
If foundsheet.Visible Then
MsgBox "Worksheet # " & foundsheet.Name & " # is EMPTY"
Else 'sheet is hidden
MsgBox "Worksheet # " & foundsheet.Name & " # is HIDDEN and is EMPTY"
End If
Else 'At least 1 cell contains data
If foundsheet.Visible Then
MsgBox "Worksheet # " & foundsheet.Name & " # CONTAINS DATA"
Else 'sheet is hidden
MsgBox "Worksheet # " & foundsheet.Name & " # is HIDDEN and CONTAINS DATA"
End If
End If
Next foundsheet

End Sub


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.