Countif not ="" or contains no formula

goldfish

Well-known Member
Joined
Aug 23, 2005
Messages
712
I want to count all the cells in a range that visibly contain no data, so either have no formula or are =""

I tried both of the following with no success
Code:
=COUNTIF(A1:A9,"<>""")
=COUNTIF(A1:A9,"<>""""")

Thanks,
~Gold Fish
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Code:
{=COUNT(IF($A$1:$A$9<>"",$A$1:$A$9))}

As an array formula this works..
 
Upvote 0
2 points of correction:

1. I meant to say I want to count the cells that DO have visible data

2. This is for a defined name, so array formulas (I believe) will not work.

I'm just trying to do something like
=OFFSET($A$1:$A$9,0,0,SOMECOUNT($A$1:$A$9),1)
as a defined range to select the data in the range (yes the data will all be at the top, but sometime the blanks are ="" and sometimes they have no formula, and I want to account for both)

Thanks,
~GoldFish
 
Upvote 0
=COUNTA(A1:A9)

CountA works blank cells contain no data, but countA also counts cells that are ="", which I don't want.

IF I have

Code:
A1: DATA1
A2: DATA2
A3: DATA3
A4: =""
A5:
I would like the count to be 3, and no combination of COUNT, COUNTA and COUNTBLANK has worked for me.

Thanks,
Gold Fish
 
Upvote 0

Forum statistics

Threads
1,220,938
Messages
6,156,968
Members
451,388
Latest member
fitzmorrispr

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