# Counting formulas in Excel and Google Sheets

> Count rows that match one condition or several, between dates, by text, blanks and unique values. 6 answers, each checked by running it.

Source: https://spreadsheetpractice.com/formulas/topic/count · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on October 29, 2026

## Answers

- [How to count cells between two dates in Excel](https://spreadsheetpractice.com/formulas/count-cells-between-two-dates): Use COUNTIFS with two conditions on the same date column: on or after the start date, and on or before the end date. `=COUNTIFS(B2:B11,">="&G1,B2:B11,"<="&G2)`
- [How to count cells that contain specific text in Excel](https://spreadsheetpractice.com/formulas/count-cells-that-contain-specific-text): Use COUNTIF with wildcards: =COUNTIF(range,"*"&text&"*") counts every cell that contains the text anywhere. `=COUNTIF(A2:A10,"*"&D1&"*")`
- [How to count with multiple criteria in Excel](https://spreadsheetpractice.com/formulas/count-with-multiple-criteria): Use COUNTIFS with one range-and-condition pair per criterion; a row is counted only when all of them are true. `=COUNTIFS(B2:B10,G1,C2:C10,">="&G2,D2:D10,"Won")`
- [How to count unique values in Excel](https://spreadsheetpractice.com/formulas/count-unique-values): In Excel 365, wrap UNIQUE in COUNTA: =COUNTA(UNIQUE(range)). In older versions, use =SUMPRODUCT(1/COUNTIF(range,range)). `=COUNTA(UNIQUE(A2:A10))`
- [How to count cells that are not blank in Excel](https://spreadsheetpractice.com/formulas/count-cells-that-are-not-blank): Use =COUNTA(range). It counts every cell that has anything in it: numbers, text, dates and errors. `=COUNTA(C2:C8)`
- [How to count cells greater than a number in Excel](https://spreadsheetpractice.com/formulas/count-cells-greater-than-a-number): Use COUNTIF with the operator in quotes joined to the cell: =COUNTIF(range,">"&E1). `=COUNTIF(B2:B8,">"&E1)`

More topics: [Sum formulas](https://spreadsheetpractice.com/formulas/topic/sum) · [Lookup formulas](https://spreadsheetpractice.com/formulas/topic/lookup) · [IF and logic formulas](https://spreadsheetpractice.com/formulas/topic/logic) · [Text formulas](https://spreadsheetpractice.com/formulas/topic/text) · [Date formulas](https://spreadsheetpractice.com/formulas/topic/date) · [Dynamic array formulas](https://spreadsheetpractice.com/formulas/topic/dynamic) · [Duplicates and data cleanup formulas](https://spreadsheetpractice.com/formulas/topic/cleanup) · [Rounding and math formulas](https://spreadsheetpractice.com/formulas/topic/math) · [Percentage formulas](https://spreadsheetpractice.com/formulas/topic/percent)

Every answer: [Formula answers](https://spreadsheetpractice.com/formulas). Formulas used: `COUNTIFS`, `COUNTIF`, `COUNTA`, `UNIQUE`, `COUNTUNIQUE`

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
