View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Countif questions

If I understand you correctly, try this:

=COUNTIF($A$1:$A$9, ""&B1)

Does that help?
-------------------

Regards,

Ron
Microsoft MVP (Excel)


--------------------
"GeorgeW" wrote in message
...
I have a problem with the countif function

Here's a simple example of what I'm trying to do
here's my sheet, columns A and B
A B C
1 2
2 2
3 2
4 3
5 3
6 3
7 4
8 4
9 4

In Cell C1, when I put in function =countif($A$1:$A$9, "2")
this returns 7, which is what I want.

But I want to put =countif($A$1:$A$9, "B1") and so on for each row in
column B. It doesn't work. I tried =countif($A$1:$A$9, B1) too, and it
gave
me an syntax error.

Is there a way I can accomplish what I want?

Any help would be greatly appreciated!
Thanks!