Applies To
Excel for Microsoft 365 Excel 2024 Excel 2021 Excel 2019 Excel 2016 Microsoft Office Microsoft365.com

Use COUNTIF to count the number of cells that meet a specific criteria. For example, you are preparing a report and want to count how many sales invoices were greater or lesser than a particular value. Use the COUNTIF function to count numbers greater than or less than a number.

COUNTIF examples

Cells A11 and A12 have formulas where COUNTIF checks the B2:B7 range for the number of invoice values less than 20000 and greater than or equal to 20,000. COUNTIF finds 4 values less than 20000 and 2 values greater than and equal to 20000.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.