COUNTIF Not Blank Help

KuraiChikara

Board Regular
Joined
Nov 16, 2016
Messages
111
Office Version
  1. 2013
Platform
  1. Windows
Hello,
I am trying to count cells if they are not blank without including extra rows or columns to do so.
I know how to represent if a cell is not blank but I do not know how to count them.

Example:
In the grid below A1 has my header and A2-A5 has a 1 or it doesnt.
B1 has my header and B2-B5 has my formula.
The formula I'm using basically says "IF A2 is not blank put "NOT BLANK" or put "BLANK" and it works.
=IF(A2<>"","NOT BLANK","BLANK")

Now from here, I could use another column to simply count, "Blank or Not Blank" but I don't want to do that.
The same formula does not work if I try to use "COUNTIF" this formula =COUNTIF(A2:A5,<>"") does not work

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD="align: center"]Value
[/TD]
[TD="align: center"]Formula[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]NOT BLANK[/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"]BLANK[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]NOT BLANK[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]NOT BLANK[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi, why not just use COUNT on Column A: =COUNT(A2:A5)

if you really want to use COUNTIF it can be used like =COUNTIF(A2:A5,"<>")
 
Last edited:
Upvote 0
Or if col A is either 1 or blank you could use
=COUNTIF(A2:A7,"1")
 
Upvote 0
Your 2nd formula works thank you!
I should have been more specific. It's to count blanks and non blanks with any combination of data; numbers, names, dates, etc. COUNT only works on numbers but COUNT IF with the not equal to symbols works fine.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top