Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Count non-blank cells?


I would like to count the number of cells in a range that are blank
(or that appear blank). That is, it would count empty cells as well
as cells whose formula returns a blank (=""). Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Count non-blank cells?

=COUNTIF(A1:A100,"")

On Jun 3, 10:37*pm, Matt wrote:
I would like to count the number of cells in a range that are blank
(or that appear blank). *That is, it would count empty cells as well
as cells whose formula returns a blank (=""). *Is this possible?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count non-blank cells?

Try this:

=COUNTBLANK(A1:A10)

Counts both empty cells and cells that contain formula blanks.

--
Biff
Microsoft Excel MVP


"Matt" wrote in message
...

I would like to count the number of cells in a range that are blank
(or that appear blank). That is, it would count empty cells as well
as cells whose formula returns a blank (=""). Is this possible?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Count non-blank cells?

Now how about this:

How would I count the number of cells that are NOT blank? So that
even if the cell does contain a formula but still shows as blank (such
as ="") , then it is not counted as a non-blank cell
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count non-blank cells?

If the cells contain only TEXT entries:

=COUNTIF(A1:A10,"?*")

Or, this generic version will count any type of entry:

=SUMPRODUCT(--(LEN(A1:A10)0))

--
Biff
Microsoft Excel MVP


"Matt" wrote in message
...
Now how about this:

How would I count the number of cells that are NOT blank? So that
even if the cell does contain a formula but still shows as blank (such
as ="") , then it is not counted as a non-blank cell





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 60
Default Count non-blank cells?

=COUNTIF(A1:A10,"?*")

=SUMPRODUCT(--(LEN(A1:A10)0))


Both work perfectly. What does the "?*" mean? and what does the --
before the len function do?

Thank you!
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Count non-blank cells?

What does the "?*" mean?

Both the ? and the * are wildcard characters.

The ? wildcard represents any *single* text character.

The * represents any number of text characters.

These wildcards only work on TEXT.

So the formula checks to make sure there is any single text character or any
number of text characters in the cells. A formula blank ("") is not any
single text character and fails the test so it's not counted.

what does the -- before the len function do?


See these:

http://xldynamic.com/source/xld.SUMPRODUCT.html

http://mcgimpsey.com/excel/formulae/doubleneg.html

--
Biff
Microsoft Excel MVP


"Matt" wrote in message
...
=COUNTIF(A1:A10,"?*")


=SUMPRODUCT(--(LEN(A1:A10)0))


Both work perfectly. What does the "?*" mean? and what does the --
before the len function do?

Thank you!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count from Blank & Non-Blank Cells Mandeep Dhami Excel Discussion (Misc queries) 4 February 12th 08 03:25 PM
Count the non blank cells vijaydsk1970 Excel Worksheet Functions 3 November 10th 06 12:04 PM
Count the non blank cells vijaydsk1970 Excel Worksheet Functions 1 November 9th 06 02:25 PM
Do Not count blank cells imjustme Excel Discussion (Misc queries) 4 November 1st 05 04:44 PM
COUNT ONLY CELLS THAT AREN'T BLANK paulinec Excel Worksheet Functions 8 January 8th 05 01:51 AM


All times are GMT +1. The time now is 04:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"