# COUNTIF

#### ipsdan

##### Board Regular
I want to calculate the number of times there is a cell contains some data i.e. is not blank within a range. I should know but I don't, any help appreciated.

### Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

#### howzat

##### Board Regular
Hi there,

Try =COUNTA(range)

#### hattster

##### Board Regular
You could also try
=COUNTIF(range)"<>"
This should eliminate all blanks

##### Well-known Member
=COUNTIF(range),"<>")

#### Zack Barresse

##### MrExcel MVP

=COUNTBLANK(A1:A10)
for blanks.

=COUNTA(A1:A10)
for text/numbers.

=COUNT(A1:A10)
for numbers only.

Replies
3
Views
362
Replies
12
Views
534
Replies
1
Views
183
Replies
9
Views
160
Replies
2
Views
244

1,195,592
Messages
6,010,621
Members
441,558
Latest member
lambierules

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back