Specifying the Number of Worksheets in a New Workbook

by Allen Wyatt
(last updated August 25, 2018)

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, and 2016.

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

Using AutoCorrect to Start Macros

As you are typing, AutoCorrect provides a "check" that what you are entering doesn't match some pre-defined error ...

Discover More

Automatically Adding Tabs in Footnotes

When you add a footnote to a document, Word's normal formatting adds a space after the footnote number and before the ...

Discover More

Specifying a Browser in a Hyperlink

Excel allows you to easily add hyperlinks to a worksheet. Click on it, and the target of the link is opened in a browser ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Protecting a Single Worksheet

Excel allows you to protect your worksheets easily—and that includes if you need to protect only a single worksheet ...

Discover More

Hiding and Unhiding Worksheets

Worksheets are easily accessible in a workbook, but you may not want them to be so open. You can hide worksheets so they ...

Discover More

Shifting Objects Off a Sheet

One day you are just editing your worksheet like you normally do, then you see an error that says "Cannot shift object ...

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}] 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 9 + 9?

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.