ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Conditional math
  3. COUNTIF From Another Sheet in Excel

COUNTIF From Another Sheet in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

To use COUNTIF on another sheet, put the sheet name and an exclamation mark before the range: =COUNTIF(Orders!C2:C8,"Shipped"). If the sheet name has spaces, wrap it in single quotes, like 'Q1 Orders'!C2:C8. The criteria can come from a cell on the current sheet. COUNTIF can't count across several sheets in one 3-D range, so add one COUNTIF per sheet.

Key takeaways

  • The pattern is SheetName!Range, for example =COUNTIF(Orders!C2:C8,"Shipped").
  • Wrap sheet names that contain spaces or symbols in single quotes: 'Q1 Orders'!C2:C8.
  • Click the other tab while typing the formula and Excel writes the sheet reference for you.
  • COUNTIF doesn't accept 3-D ranges like Jan:Mar!C2:C50. Add one COUNTIF per sheet instead.
  • COUNTIF on a closed workbook returns #VALUE!. Open the file or use SUMPRODUCT.
On this page+
  1. How to COUNTIF from another sheet
  2. How to build the reference by clicking
  3. Sheet names with spaces or symbols
  4. Use criteria from the current sheet
  5. How to count across several sheets
  6. COUNTIF from another workbook
  7. Why COUNTIF from another sheet returns 0 or an error
  8. Practise it

To COUNTIF from another sheet, write the sheet name and an exclamation mark in front of the range, like =COUNTIF(Orders!C2:C8,"Shipped"). Everything else about COUNTIF stays the same. This guide shows how to build the reference by clicking, handle sheet names with spaces, count across several tabs and fix the errors that only appear when the data lives somewhere else.

How to COUNTIF from another sheet#

A reference to another sheet is the sheet name, an exclamation mark, then the range. COUNTIF accepts it like any other range:

Excel formula
=COUNTIF(SheetName!range, criteria)

All the examples use an Orders sheet with this data in A1:D8:

ABCD
1OrderCustomerStatusAmount
21001LeeShipped120
31002PatelPending85
41003GarciaShipped240
51004LeeCancelled60
61005OkaforShipped150
71006PatelShipped95
81007GarciaPending310

On a separate Summary sheet, this counts the shipped orders:

Excel formula
=COUNTIF(Orders!C2:C8,"Shipped")

The result is 4 (orders 1001, 1003, 1005 and 1006). The criteria works exactly as it does on one sheet: text in double quotes, comparisons like ">100" in quotes too. If COUNTIF itself is new to you, start with the complete COUNTIF guide.

How to build the reference by clicking#

You don't have to type the sheet name. Excel writes it for you if you click the other tab while the formula is open:

  1. On the Summary sheet, click the cell for the result and type =COUNTIF(.
  2. Click the Orders tab at the bottom of the window.
  3. Select C2:C8. The formula bar now shows =COUNTIF(Orders!C2:C8.
  4. Type ,"Shipped") and press Enter.

Excel returns you to the Summary sheet with the answer. Don't click back to the Summary tab before you press Enter, or Excel may add a reference to the wrong sheet. To move between tabs with the keyboard, use Ctrl+Page Down and Ctrl+Page Up on Windows, or Option+Right Arrow and Option+Left Arrow on a Mac. The worksheets and cross-sheet references lesson practises this.

Sheet names with spaces or symbols#

If the sheet name contains spaces, hyphens or other symbols, wrap it in single quotes:

Excel formula
=COUNTIF('Q1 Orders'!C2:C8,"Shipped")

The quotes go around the sheet name only, and the exclamation mark comes after the closing quote. When you build the reference by clicking, Excel adds the quotes for you. If you rename a sheet later, Excel updates every formula that points to it.

The general rules for sheet references, including whole-column references and tables, are in the guide on how to reference another sheet in Excel.

Use criteria from the current sheet#

The range can be on one sheet and the criteria on another. This is how you build a summary table. On the Summary sheet, type the statuses Shipped, Pending and Cancelled in A2:A4. In B2, type:

Excel formula
=COUNTIF(Orders!$C$2:$C$8,A2)

Fill it down to B4 (Ctrl+D on Windows, ⌘D on a Mac) to get 4, 2 and 1. The $ signs lock the range on the Orders sheet so it doesn't slide down as you fill. A2 has no $, so it moves to A3 and A4.

Comparisons work across sheets too. To count orders over 100:

Excel formula
=COUNTIF(Orders!D2:D8,">100")

The result is 4 (120, 240, 150 and 310). See COUNTIF greater than a number for more comparison criteria, and COUNTIF for cells that contain text for partial matches. With two conditions, COUNTIFS works the same way: =COUNTIFS(Orders!B2:B8,"Patel",Orders!C2:C8,"Shipped") returns 1.

How to count across several sheets#

COUNTIF can't use a 3-D reference, the kind that spans tabs like Jan:Mar!C2:C50. That formula returns #VALUE!. Instead, add one COUNTIF per sheet:

Excel formula
=COUNTIF(Jan!C2:C50,"Shipped")+COUNTIF(Feb!C2:C50,"Shipped")+COUNTIF(Mar!C2:C50,"Shipped")

This is long but clear, and each part can be checked on its own. For many monthly tabs, a cleaner design is one data sheet with a Month column. Then a single COUNTIFS does the job: =COUNTIFS(Data!B:B,"Mar",Data!C:C,"Shipped"). If your data is in an Excel table named Orders, you can skip the sheet name entirely: =COUNTIF(Orders[Status],"Shipped") works from any sheet.

COUNTIF from another workbook#

You can point COUNTIF at another file, and Excel adds the file name in square brackets:

Excel formula
=COUNTIF([Sales.xlsx]Orders!$C$2:$C$8,"Shipped")

This works while Sales.xlsx is open. When it is closed, COUNTIF returns #VALUE!, because COUNTIF, COUNTIFS, SUMIF and SUMIFS only read ranges in open workbooks. Microsoft documents this on the COUNTIF page. You have two fixes:

  1. Open the source workbook, then recalculate.
  2. Use SUMPRODUCT, which reads closed workbooks: =SUMPRODUCT(--([Sales.xlsx]Orders!$C$2:$C$8="Shipped")). The test inside the brackets gives TRUE or FALSE for each row, and -- turns them into 1s and 0s to add up.

Why COUNTIF from another sheet returns 0 or an error#

Most problems come from the reference, not the criteria. Check these:

  • #REF! means the sheet was deleted. Undo with Ctrl+Z (Windows) or ⌘Z (Mac), or rebuild the reference.
  • A file window opens when you press Enter: Excel can't find a sheet with that name and thinks you mean another file. Fix the spelling or add the single quotes.
  • #VALUE! means a closed source workbook or a 3-D reference, as above.
  • 0 when you expect more usually means the criteria doesn't match exactly. Look for extra spaces or a different spelling, and check the range covers every row. A range that stops at row 7 drops order 1007.
  • A count of filled cells is easier with "<>"; see COUNTIF for non-blank cells.

The COUNTIF function guide is a quick reference for every criteria type.

Practise it#

Try the exercise on this page, then practise COUNTIF in a live spreadsheet, where you type each formula and it is checked instantly. When you're comfortable, move on to the worksheets and cross-sheet references lesson to use other tabs in real formulas.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Here the order list sits in A1:D8 so you can see it. On a real workbook it would be on an Orders tab and you'd write Orders!C2:C8. In G2, count how many orders have the status in F2: =COUNTIF(C2:C8,F2).

fx
ABCDEFGH
1
Order
Customer
Status
Amount
Status
Orders
2
1001
Lee
Shipped
120
Shipped
3
1002
Patel
Pending
85
4
1003
Garcia
Shipped
240
5
1004
Lee
Cancelled
60
6
1005
Okafor
Shipped
150
7
1006
Patel
Shipped
95
8
1007
Garcia
Pending
310
9
10
11

Tip: The range to check is the Status column, C2:C8. The criteria is the cell F2, with no quotes.

Practise this in a lesson

LessonCOUNTIFCount the cells that match a condition, from exact words to number checks like ">=8".LessonWorksheets and cross-sheet referencesSwitch, add and rename worksheet tabs, then use other sheets in formulas: Prices!B3, a lookup against a price list tab, and a total across monthly tabs.Function guideCOUNTIFCount cells that match one condition with COUNTIF: text, numbers, wildcards and cell references. Real examples and a live exercise.

Frequently asked questions

How do I use COUNTIF with a range on another sheet?

+

Type the sheet name, an exclamation mark and the range: =COUNTIF(Orders!C2:C8,"Shipped"). Or type =COUNTIF( and click the other tab to select the range, and Excel writes the reference for you.

How do I COUNTIF across multiple sheets?

+

Add one COUNTIF per sheet: =COUNTIF(Jan!C2:C50,"Shipped")+COUNTIF(Feb!C2:C50,"Shipped"). A 3-D reference such as Jan:Feb!C2:C50 doesn't work inside COUNTIF.

Why does COUNTIF from another workbook return #VALUE!?

+

COUNTIF only reads ranges in workbooks that are open. Open the source file and the result returns, or use SUMPRODUCT, which also works when the source workbook is closed.

Why does Excel open a file window when I type a sheet reference?

+

Excel can't find a sheet with that name, so it thinks you mean another file. Check the spelling of the sheet name and add single quotes if it contains spaces.

Sources

  • COUNTIF function - Microsoft Support
  • Create or change a cell reference - Microsoft Support
  • SUMPRODUCT function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How to COUNTIF from another sheet
  2. How to build the reference by clicking
  3. Sheet names with spaces or symbols
  4. Use criteria from the current sheet
  5. How to count across several sheets
  6. COUNTIF from another workbook
  7. Why COUNTIF from another sheet returns 0 or an error
  8. Practise it

Keep reading

Conditional math· 6 min read

How to Use COUNTIF in Excel (With Criteria Examples)

COUNTIF counts the cells in a range that meet one condition. Write =COUNTIF(range, criteria), for example =COUNTIF(D2:D9,"Open") to count open tickets. Put text and comparisons in double quotes, like ">=8" or "<>Low". Numbers and cell references go in without quotes. For two or more conditions, use COUNTIFS.

Conditional math· 6 min read

COUNTIF Contains Text: Count Partial Matches

To count cells that contain a word anywhere in the text, put asterisks around it: =COUNTIF(A2:A8,"*blue*"). The * wildcard stands for any number of characters, so the formula counts "Blue Jeans", "Navy Blue Jacket" and "Light blue Cap". For a word in a cell, use "*"&E1&"*". COUNTIF ignores capitals.

Conditional math· 6 min read

COUNTIF Greater Than, Less Than and Equal To

To count cells greater than a number, put the operator and the number together in quotes: =COUNTIF(B2:B8,">50"). Use "<50" for less than, ">=50" for greater than or equal to, and "<>50" for not equal to. To use a number from a cell, join it with &: =COUNTIF(B2:B8,">"&E1).

More on conditional math

  • COUNTIF Between Two Numbers in Excel
  • COUNTIF With Dates: Before, After and Between
  • COUNTIF With Multiple Values (OR Logic)
  • Count Non-Blank Cells With a Condition in Excel
  • COUNTIF Not Equal To: Count Cells That Don't Match
  • How to Calculate a Percentage With COUNTIF in Excel
All conditional math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free