count function is inaccurate

S

savasthi

In order to learn how to use this function, I deliberately placed a value of
"4" in 5 out of 20 cells. Then, I put in the "=COUNT (A1:A20, 4). The
number returned to me was 6. I know this is inaccurate, so what am I doing
wrong?
 
S

sebastienm

Hi,
What you meant to use was COUNTIF()
=COUNTIF(A1:A20,4)
means : count values in A1:A20 only if they are equal to 4
while
=COUNT(Value1,Vlaue2,Value3,...)
just count values, so
=COUNT(A1:A20,4)
is equal to "counts of values in A1:A20" + "count of values in 4"
is equal to the 5 (cells where you've entered 4) + 1 (the 4 entered as
function parameter)

Regards,
Sebastien
 
D

Dave Peterson

And =count() worked perfectly.

It counted the quantity of numbers in A1:A20 (the 5 you put in) and then counted
the 4 in your formula to get a total of 6.

kind of like:

=COUNT(1,2,3,4,5,"a","b","c",6,7)
will return 7.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top