How to count non blank cells in excel
Tutor 5 (54 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
To count non-blank cells in Excel, use the COUNTA function.
A non-blank cell is any cell that contains data, including numbers, text, dates, or formulas that return a value. Empty cells or cells containing only spaces are considered blank.
Steps to Count Non-Blank Cells
-
Select the cell where you want the result to appear.
-
Enter the formula:
=COUNTA(range)
Replace
rangewith the actual range of cells you want to count. For example:=COUNTA(A1:A20)
-
Press Enter. The formula will return the number of non-blank cells within the selected range.
Notes on Counting Non-Blank Cells
-
Cells with formulas returning an empty string (
"") are counted as non-blank. -
Cells containing spaces are considered non-blank. Use the
TRIMfunction to clean spaces if needed. -
For counting non-blank numeric cells only, combine
COUNTandIFfunctions.
Example
If the range B1:B10 contains:
-
B1: 10
-
B2: (empty)
-
B3: "Hello"
-
B4: ""
-
B5: 5
Formula:
=COUNTA(B1:B10)
Result: 4
Explanation: B1, B3, B4 (formula returning ""), and B5 are counted. B2 is empty and ignored.
Counting Non-Blank Cells with Conditions
To count non-blank cells based on a condition, use the COUNTIFS function:
Example: Count non-blank cells in C1:C10 where D1:D10 equals "Yes":
=COUNTIFS(C1:C10,"<>",D1:D10,"Yes")
This counts only the cells in column C that are non-blank and meet the condition in column D.
Mac vs Windows Differences
The functions COUNTA and COUNTIFS work identically on both Windows and Mac versions of Excel. Shortcut keys may differ:
-
Windows:
Ctrl + Shift + Entermay be needed for array formulas in older versions. -
Mac:
Command + Shift + Enterfor array formulas in older versions.
This method ensures accurate counting of all non-blank cells in your dataset.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why are margins not working
Answers · 1
Why is page layout not working
Answers · 1
How to print repeated rows on top in excel
Answers · 1
How to print header on each page
Answers · 1