Excel COUNTA Practice Question: Quantities are in B2:B9. Some cells hold the text n/a and some are empty. How…
The question
Quantities are in B2:B9. Some cells hold the text n/a and some are empty. How many cells have an entry (number or text)? Put it in D2.
The data
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Item | Qty | Result | |
| 2 | Item 1 | 120 | ? | |
| 3 | Item 2 | n/a | ||
| 4 | Item 3 | 95 | ||
| 5 | Item 4 | |||
| 6 | Item 5 | 210 | ||
| 7 | Item 6 | n/a | ||
| 8 | Item 7 | |||
| 9 | Item 8 | 160 |
The yellow cell is where your answer goes.
Show answer
Answer in D2: 6
How it works
Explanation: Unlike COUNT, COUNTA also counts text. COUNT would return 4 here.
Syntax: =COUNTA(B2:B9)
120, n/a, 95, 210, n/a and 160 are entries, so 6.
Try it yourself in the live sheet
Type your formula in the highlighted cell and get instant feedback. Free, no Excel install needed.
Try this question in the live sheet →COUNTA syntax
=COUNTA(value1, [value2], ...)
Counts how many cells in a range are not empty. COUNTA is used in data analysis work to summarize or test patterns across a data set. Full COUNTA guide.
More COUNTA practice questions
- Customer names are in A2:A9 (some rows are empty). How many names are listed? Put it in…
- Using the same table, how many customers already have a status in B2:B9? Put it in D2.
- Using the customer table, find the share of rows that have a name (A2:A9), as a decimal…
- Attendance is marked P in B2:C7 (two days) and left empty when absent. How many P marks…
- The records start under a header in row 1. Count the customer records in column A…
- Using the attendance table, how many students attended on at least one day? Put it in E2.
- Using the customer table, how many rows have a name in column A but no status in column…
All practice questions · Excel exercises · Interview prep · Cheat sheet