Thread: Excel Bugs
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rguerrie rguerrie is offline
external usenet poster
 
Posts: 8
Default Excel Bugs

Hmmm.
Can you give me an example of when counta(a1:a23,"x") might be used,
then?

On Feb 2, 1:19 am, "T. Valko" wrote:
You're using the wrong function for the task you want to achieve.

Try it like this:

=COUNTIF(A1:A23,"x")

COUNTA returns the total count of its arguments that *are not empty*.

=COUNTA(A1:A23,"x")

That formula contains 2 arguments: A1:A23 and the text string "x".

If A1:A23 is completely empty the count from that range (argument) is 0. The
second argument is the text string "x" which is "not an empty argument" so
it counts as 1.

So:

=COUNTA(A1:A23,"x") = 1
=COUNTA(A1:A23,"x","y","z") = 3

Which is correct!

--
Biff
Microsoft Excel MVP

"rguerrie" wrote in message

...

Excel is counting incorrectly, I think. I am using counta to count
the number of Xs in a column. If I enter counta(a1:a23,"x") it
evaluates to 1, which is incorrect. If I enter counta(a1:a23) it
evaluates to zero, which is correct. To verify this I search/find a1
to a23 for x, it says there aren't any. I also visually inspect the
column and there are no Xs. It does this in a number of columns.
It also miscounts 1 X as 2 Xs. When there is more than 1 X in a
column, it appears to count correctly.


My spreadsheets aren't that big, less than a MB each. This is not the
first problem I have encountered. When I copy then past special--
values only and transpose, it sticks in extra cells containing zeros.
I get a lot of buggy stuff like this. Why do I not see other people
complaining about things like this? I am a fairly sophisticated
computer user. Can anyone tell me if I am doing something wrong.