Please note javascript is required for full website functionality.

Blog

A to Z of Excel Functions: The SHEETS function

16 June 2025

Welcome back to our regular A to Z of Excel Functions blog. Today we look at the SHEETS function.


The SHEETS function

A new function in Excel 2013, the SHEETS function in Excel returns the number of sheets in a reference.  This includes any hidden, very hidden, macro, chart or dialog sheets.

The SHEETS function employs the following syntax to operate:

SHEETS(reference)

The SHEETS function has the following argument:

  • reference: this is optional and represents a reference for which you want to know the number of sheets it contains.  If reference is omitted, SHEETS returns the number of sheets in the workbook that contains the function.

It should be noted that:

  • SHEETS includes all worksheets (visible, hidden or very hidden) in addition to all other sheet types (macro, chart or dialog sheets)
  • if the reference argument is not a valid value, SHEETS returns the #REF! error value
  • SHEETS is not available in the Object Model (OM) because the Object Model already includes similar functionality.

Please see my examples below: 

We’ll continue our A to Z of Excel Functions soon.  Keep checking back – there’s a new blog post every business day.

A full page of the function articles can be found here

Newsletter