Information
Excel 2013
◉ 19 views
=SHEETS()
Returns the number of sheets in a reference.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=SHEETS(reference)
Hover argument names in the table for details.
Output typeNumber
Popularity20 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =SHEETS() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
🧠 🧠 Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
reference |
Reference | Optional | Reference is 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. |
▣ Examples
Because there is no Reference argument specified, the total number of sheets in the workbook is returned (3).
=SHEETS()
Result:
3
Returns the number of sheets in a 3D reference with the defined name My3DRef, which includes Sheet2 and Sheet3 (2).
=SHEETS(My3DRef)
Result:
2
§ Remarks
- SHEETS includes all worksheets (visible, hidden, or very hidden) in addition to all other sheet types (macro, chart, or dialog sheets).
- If reference 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.
✦ Tips
- SHEETS includes all worksheets (visible, hidden, or very hidden) in addition to all other sheet types (macro, chart, or dialog sheets).
- SHEETS is not available in the Object Model (OM) because the Object Model already includes similar functionality.
⚠ Common Errors
#REF!
If reference is not a valid value, SHEETS returns the #REF! error value.
Fix: Correct the reference
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!