Ravindra BagaleCourses & study guides Track your progress

Excel SHEETS Function

Chala mitrano — today SHEETS. How many sheets does this workbook (or 3D ref) contain?

Fictional sample data for learning. Sheet counts for Erode workbook QA and Montreal consolidation packs.

Purpose

Return the number of sheets in a reference, or in the workbook if omitted.

Return value

A count of sheets.

Syntax

SHEETS([reference])

Arguments

ArgumentRequired?Description
referenceOptionalA reference spanning sheets; omit to count all sheets in the workbook (including hidden).

Version

All modern Excel versions. LibreOffice Calc and Google Sheets have matching or close equivalents.

How to use — Why → What → How

Why: QA macros assert ‘expected 5 sheets’. SHEETS() is the quick count. Sheet counts for Erode workbook QA and Montreal consolidation packs.

What: SHEETS() counts workbook sheets including hidden. A 3D reference like Sheet1:Sheet3!A1 counts sheets in that span. Info functions are the seatbelts of messy imports: they tell you what kind of value you have before you compute. Prefer the narrow test (ISNA, ISBLANK) when you need precision; use ISERROR or TYPE when you need a broad gate. Always verify blanks versus empty strings versus zeros — they look alike on screen and fail differently in formulas. For CELL and INFO, treat format/environment codes as build-specific and document ‘verify on your Excel’ in class notes.

How — numbered steps:

  1. Type =SHEETS().
  2. Compare before/after inserting a tab.
  3. Call out hidden sheets in audits.

Ravindra Bagale's Tip

Friends, after SHEETS, find one column or range in a real workbook this week where this lesson saves time.

Ravindra Bagale's Tip

Friends, sleep on SHEETS; rebuild example 1 tomorrow without looking.

Ravindra Bagale's Tip

Friends, say the business question in plain words before =SHEETS.

Ravindra Bagale's Tip

Friends, check a known case with a calculator before you trust a long SHEETS chain.

Ravindra Bagale's Tip

Friends, after you finish SHEETS, open yesterday’s real workbook and find one place this function would have saved ten minutes.

Ravindra Bagale's Tip

Friends, treat blank, zero, and empty text as three different animals when you use SHEETS.

Download practice file: practice-sheets.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Workbook count

Erode.

#
Formula: =SHEETS()

Result: 3

What it means: Illustrative 3-sheet book.

2) After insert

Grow.

#
Formula: =SHEETS()

Result: 4

What it means: Count rises — illustrative.

3) Montreal QA

Assert.

#
Formula: =IF(SHEETS()=3,"ok","check")

Result: ok

What it means: Gate on expected count.

4) vs SHEET

Index.

#
Formula: =SHEET()

Result: 1

What it means: Index ≠ count.

5) Hidden still count

Audit.

#
Formula: =SHEETS()

Result: 3

What it means: Hidden included — classroom note.

6) Bad expectation

Fail gate.

#
Formula: =IF(SHEETS()=99,"ok","check")

Result: check

What it means: Mismatch flagged.

Common errors and fixes

Hidden included — Surprise counts. Fix: Unhide to verify.
Illustrative — Depends on file. Fix: Not a fixed constant.
3D refs — Span counts. Fix: Advanced.

Notes and tips

  • Revisit the SHEETS errors table after the quiz.
  • Build example 1 from memory on a blank sheet.
  • Check number vs text if a result looks wrong.
  • Teach one tip in Marathi or Hindi this week.
  • Keep currency symbols consistent inside one report column (practice mixes ₹ $ £ €).
  • Drill: assert SHEETS()=3 with IF from memory on a sample book.
  • SHEETS vs SHEET: how many versus which number.
  • Fictional sample data only — names and amounts are for learning.
  • Print the SHEETS revision card for one week of real worksheets.
  • Ask juniors to predict before they press Enter.
  • Track your top mistake with this function monthly.
  • Sheet counts for Erode workbook QA and Montreal consolidation packs.
  • Interview tip: explain the business question before the formula.
  • Classroom drill: invent three brand-new formulas from your city without the page open.
  • If a result looks wrong, check blanks vs zeros before rewriting.
  • When Excel versions differ, note the LibreOffice / Sheets fallback in a cell comment.
  • Prefer clear ranges over whole-column refs on huge sheets if speed matters.
  • Document units (₹, kg, days) in the header so totals stay honest.
  • Distinguish blank, "", 0, and text "0" before you trust any IS* result.
  • Prefer IFNA for lookup misses and IFERROR for broad display substitutes.
  • TYPE codes: 1 number, 2 text, 4 logical, 16 error, 64 array — card them.
  • ERROR.TYPE: 2=#DIV/0!, 7=#N/A — card the rest for audits.
  • Always pass a reference to CELL; omitting it is volatile and confusing in shared books.
  • INFO and some CELL format codes vary by host — flag uncertain in lesson notes.
  • SHEETS includes hidden sheets; unhide before trusting a QA count.
  • Fictional sample data only — never paste real customer sheets into class files.
  • Teach one junior blank-vs-zero in Marathi or Hindi this week.
  • Print the revision card and stick it near the monitor for one week of real worksheets.

In real work

Drill: assert SHEETS()=3 with IF from memory on a sample book. Sheet counts for Erode workbook QA and Montreal consolidation packs. Classroom drill: write three brand-new SHEETS formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain. Keep a personal notebook of the one mistake you make most often with this function; review it monthly. The IS* family returns booleans you can nest in IF; IFERROR/IFNA are the modern display wrappers when you only need a substitute value. TYPE collapses several tests into codes 1/2/4/16/64. N coerces logicals for SUMPRODUCT-era maths but does not parse digit-text — that is VALUE. NA() forces chart gaps; ERROR.TYPE triage codes let support count #DIV/0! separately from #N/A. SHEET/SHEETS index and count tabs including hidden ones — QA asserts love SHEETS()=n gates.

How it compares

SHEETS vs SHEET: how many versus which number.

Interview corner

Hidden?
Included.
vs SHEET?
Count vs index.
Fixed?
No — per workbook.

SHEET, INFO

Practice tasks (10)

  1. Task 1. Count sheets.
    SHEETS.
  2. Task 2. IF ok gate.
    QA.
  3. Task 3. Compare SHEET.
    Index.
  4. Task 4. Hidden note.
    Audit.
  5. Task 5. Montreal assert.
    Use.
  6. Task 6. Interview.
    Talk.
  7. Task 7. Teach.
    Teach.
  8. Task 8. Insert then recount.
    Grow.
  9. Task 9. Fill.
    Fill.
  10. Task 10. Document.
    Note.

Quick quiz

Q1. SHEETS() returns?
Q2. Hidden sheets?
Q3. vs SHEET?
Q4. QA use?
Q5. Fixed number always?

Answers: Q1=Sheet count, Q2=Included, Q3=Count vs index, Q4=Assert expected count, Q5=No — depends on workbook (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: SHEETS
SHEETS revision card