#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default COUNTA Confusion....

I know that I'm doing something wrong, because this has to be easier
than I'm making it out to be.

In a column of data from G1:G218, I have some text based information.
They info is grouped, as such, there are empty/blank cells in column G
where the groupings change.

Using COUNTA(G1:G218) = 215
Using COUNTBLANK(G1:G218) = 15

Which makes me think that the number of populated cells is 203 which I
get by taking 218 (all cells) and subtracting 15 (the countblank
answer).

What am I missing here? What does the 215 represent from the COUNTA
formula?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default COUNTA Confusion....

You may have the situation where formulas in your range return the empty
("") string. Both COUNTA and COUNTBLANK include that in their count.
The 215 represents the number of non-empty cells. See Excel help for more
information on both functions.

Tyro

wrote in message
...
I know that I'm doing something wrong, because this has to be easier
than I'm making it out to be.

In a column of data from G1:G218, I have some text based information.
They info is grouped, as such, there are empty/blank cells in column G
where the groupings change.

Using COUNTA(G1:G218) = 215
Using COUNTBLANK(G1:G218) = 15

Which makes me think that the number of populated cells is 203 which I
get by taking 218 (all cells) and subtracting 15 (the countblank
answer).

What am I missing here? What does the 215 represent from the COUNTA
formula?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default COUNTA Confusion....

On Jan 30, 4:34 pm, "Tyro" wrote:
You may have the situation where formulas in your range return the empty
("") string. Both COUNTA and COUNTBLANK include that in their count.
The 215 represents the number of non-empty cells. See Excel help for more
information on both functions.

Tyro



That's the thing that usually gets me, but there's no formulas here.
I've examined the cells, and they appear to be empty. Clicking on the
cell, and hitting Backspace doesn't change the results.

The Help for COUNTA doesn't offer the technical detail that I am
looking for. It appears to me to be counting cells that are blank as
being populated.

Now, I can look at this column all that I want and make a manual count
and be happy. But I've got 20+ worksheets in this book, and I am
trying to compare the values in this column in a summary sheet by
using the COUNTA function, but if I cannot trust the results of
COUNTA, I'll have to manually count all of these myself. It's easy
enough to append COUNTBLANK to the COUNTA formula, but since the
ranges are of various sizes, it won't work.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default COUNTA Confusion....

Just for grins, put this formula in H1, you can insert a column if you need
to: =LEN(G1) and drag down through G218. If the cells are empty or contain a
formula that returns the empty string, the result will be 0 in each cell. If
there is anything in the cells, such as a space or any non-displayable
character, there will be a non-zero results

Tyro


That's the thing that usually gets me, but there's no formulas here.
I've examined the cells, and they appear to be empty. Clicking on the
cell, and hitting Backspace doesn't change the results.

The Help for COUNTA doesn't offer the technical detail that I am
looking for. It appears to me to be counting cells that are blank as
being populated.

Now, I can look at this column all that I want and make a manual count
and be happy. But I've got 20+ worksheets in this book, and I am
trying to compare the values in this column in a summary sheet by
using the COUNTA function, but if I cannot trust the results of
COUNTA, I'll have to manually count all of these myself. It's easy
enough to append COUNTBLANK to the COUNTA formula, but since the
ranges are of various sizes, it won't work.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default COUNTA Confusion....

Correction: Drag down through H218, not G218

Tyro

"Tyro" wrote in message
et...
Just for grins, put this formula in H1, you can insert a column if you
need to: =LEN(G1) and drag down through G218. If the cells are empty or
contain a formula that returns the empty string, the result will be 0 in
each cell. If there is anything in the cells, such as a space or any
non-displayable character, there will be a non-zero results

Tyro


That's the thing that usually gets me, but there's no formulas here.
I've examined the cells, and they appear to be empty. Clicking on the
cell, and hitting Backspace doesn't change the results.

The Help for COUNTA doesn't offer the technical detail that I am
looking for. It appears to me to be counting cells that are blank as
being populated.

Now, I can look at this column all that I want and make a manual count
and be happy. But I've got 20+ worksheets in this book, and I am
trying to compare the values in this column in a summary sheet by
using the COUNTA function, but if I cannot trust the results of
COUNTA, I'll have to manually count all of these myself. It's easy
enough to append COUNTBLANK to the COUNTA formula, but since the
ranges are of various sizes, it won't work.







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default COUNTA Confusion....

COUNTA will count all cells that are *not empty*. If a cell contains a
formula that returns a formula blank ("") COUNTA *will* count this cell.
COUNTBLANK will count *both* empty cells and cells that contain formula
blanks ("").

So, if you want a count of all cells that contain something that you can
actually see (assuming you don't have conditional formatting set to "hide"
anything and/or the cell will not contain only space characters):

=COUNTIF(G1:G218,"?*")



--
Biff
Microsoft Excel MVP


wrote in message
...
I know that I'm doing something wrong, because this has to be easier
than I'm making it out to be.

In a column of data from G1:G218, I have some text based information.
They info is grouped, as such, there are empty/blank cells in column G
where the groupings change.

Using COUNTA(G1:G218) = 215
Using COUNTBLANK(G1:G218) = 15

Which makes me think that the number of populated cells is 203 which I
get by taking 218 (all cells) and subtracting 15 (the countblank
answer).

What am I missing here? What does the 215 represent from the COUNTA
formula?



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default COUNTA Confusion....

You can use COUNTA. COUNTA counts everything except cells that are truly
empty. It includes cells that have formulas that have returned the empty
string and appear to be empty. =COUNTIF(G1:G218,"?*") counts everything
except cells with formulas that have returned the empty string and cells
containing numbers. COUNT counts cells containing numbers. If you wish to
count all cells except those with formulas that have returned the empty
string, you can use: =COUNT(G1:G218,"?*") + COUNT(G1:G218). To determine the
number of truly empty cells, use =ROWS(G1:G218)-COUNTA(G1:G218). Leave
COUNTBLANK out of it as it includes those cells with formulas that have
returned the empty string. You should not trust COUNTA - COUNTBLANK to give
you the number of non-empty cells.

Tyro

wrote in message
...
I know that I'm doing something wrong, because this has to be easier
than I'm making it out to be.

In a column of data from G1:G218, I have some text based information.
They info is grouped, as such, there are empty/blank cells in column G
where the groupings change.

Using COUNTA(G1:G218) = 215
Using COUNTBLANK(G1:G218) = 15

Which makes me think that the number of populated cells is 203 which I
get by taking 218 (all cells) and subtracting 15 (the countblank
answer).

What am I missing here? What does the 215 represent from the COUNTA
formula?



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default COUNTA Confusion....

Correction: =COUNT(G1:G218,"?*") + COUNT(G1:G218) should be:
=COUNTIF(G1:G218,"?*") + COUNT(G1:G218)

"Tyro" wrote in message
. net...
You can use COUNTA. COUNTA counts everything except cells that are truly
empty. It includes cells that have formulas that have returned the empty
string and appear to be empty. =COUNTIF(G1:G218,"?*") counts everything
except cells with formulas that have returned the empty string and cells
containing numbers. COUNT counts cells containing numbers. If you wish to
count all cells except those with formulas that have returned the empty
string, you can use: =COUNT(G1:G218,"?*") + COUNT(G1:G218). To determine
the number of truly empty cells, use =ROWS(G1:G218)-COUNTA(G1:G218). Leave
COUNTBLANK out of it as it includes those cells with formulas that have
returned the empty string. You should not trust COUNTA - COUNTBLANK to
give you the number of non-empty cells.

Tyro

wrote in message
...
I know that I'm doing something wrong, because this has to be easier
than I'm making it out to be.

In a column of data from G1:G218, I have some text based information.
They info is grouped, as such, there are empty/blank cells in column G
where the groupings change.

Using COUNTA(G1:G218) = 215
Using COUNTBLANK(G1:G218) = 15

Which makes me think that the number of populated cells is 203 which I
get by taking 218 (all cells) and subtracting 15 (the countblank
answer).

What am I missing here? What does the 215 represent from the COUNTA
formula?





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default COUNTA Confusion....

Saved from a previous post:

If you want to see what's left in that cell after you convert ="" to values,
try:
Tools|Options|Transition Tab|Toggle Transition Navigation keys on.

Then select one of those cells and look at the formula bar. You'll see an
apostrophe. (Don't forget to toggle the setting to off.)

When I want to clean up this detritus, I do this:

Select the range (ctrl-a a few times to select all the cells)
Edit|Replace
what: (leave blank)
with: $$$$$
replace all

Immediately followed by:
Edit|Replace
what: $$$$$
with: (leave blank)
replace all

wrote:

I know that I'm doing something wrong, because this has to be easier
than I'm making it out to be.

In a column of data from G1:G218, I have some text based information.
They info is grouped, as such, there are empty/blank cells in column G
where the groupings change.

Using COUNTA(G1:G218) = 215
Using COUNTBLANK(G1:G218) = 15

Which makes me think that the number of populated cells is 203 which I
get by taking 218 (all cells) and subtracting 15 (the countblank
answer).

What am I missing here? What does the 215 represent from the COUNTA
formula?


--

Dave Peterson
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
Confusion with Names mfq1975 Excel Discussion (Misc queries) 1 October 10th 06 03:02 AM
Button Confusion LACA Excel Discussion (Misc queries) 2 July 15th 06 01:04 AM
Confusion..... Eric @ CMN, Evansville Excel Discussion (Misc queries) 2 December 27th 05 07:15 PM
Chart confusion Gordon Byrne Excel Discussion (Misc queries) 0 June 14th 05 12:14 PM
COUNTA Function not working =COUNTA(C3:C69,"NH") MikeinNH Excel Worksheet Functions 2 November 8th 04 01:19 AM


All times are GMT +1. The time now is 09:24 PM.

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"