Excel.Tips.Net ExcelTips (Menu Interface)

Finding the Size of a Workbook

Summary: Keeping tabs on the size of a workbook can be important when using Excel. You have a couple of options that will allow you to find this information quickly. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Finding the Size of a Workbook.)

Mike wonders if there is a worksheet function that will show him the size, in bytes, of a workbook without using a macro.

The size of a workbook in Excel can become very large, depending on the information it contains. Keeping track of the size is important and can be accomplished a couple of different ways.

If you don't want to use a macro, Excel keeps track of various pieces of information about a file in the Properties dialog box.

  1. Select the Properties option in the File menu. Excel displays the Properties dialog box.
  2. Click on the General tab. (Click here to see a related figure.)

In the General tab, Excel displays the size of the file. You will also see other information about the file in this tab including the type of file and who created it. Obtaining the file size is simple using this process, but it does not allow you to see the workbook size on the worksheet itself. Unfortunately, there is no way around it; you will need to use a macro. The following is a good example of one you could use:

Function wbksize()
    myWbk = Application.ThisWorkbook.FullName
    wbksize = FileLen(myWbk)
End Function

To use this macro within a worksheet, just type the following in any cell:

=wbksize()

The file size is displayed in bytes.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8028) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003

You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Finding the Size of a Workbook.

Related Tips:

Save Time! ExcelTips has been published weekly since late 1998. Past issues of ExcelTips are available in convenient ExcelTips archives. Have your own enhanced archive of ExcelTips at your fingertips, available to use at any time! Check out ExcelTips Archives today!