ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count IF Formula (https://www.excelbanter.com/excel-worksheet-functions/248695-count-if-formula.html)

John

Count IF Formula
 
Hi All,

I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2" and
"HHH" should be "3".

Column A Column B Column C
HHH 10 AGB
AGB 10 HHH
HHH 10 NNN
HHH 10 MMM
AGB 10 BBB
. . .
. . .
. . .

Thank you
John

Pete_UK

Count IF Formula
 
Try this in D1 (next to AGP):

=COUNTIF(A:A,C1)

and then copy down as required.

Hope this helps.

Pete

On Nov 17, 8:42*pm, John wrote:
Hi All,

I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2" and
"HHH" should be "3".

Column A * * * * Column B * * * * *Column C
HHH * * * * * * * * * *10 * * * * * * * * * * AGB
AGB * * * * * * * * * *10 * * * * * * * * * * HHH
HHH * * * * * * * * * *10 * * * * * * * * * * NNN
HHH * * * * * * * * * *10 * * * * * * * * * * MMM
AGB * * * * * * * * * * 10 * * * * * * * * * *BBB
* *. * * * * * * * * * * * *. * * * * * * * * * * * * .
* *. * * * * * * * * * * * *. * * * * * * * * * * * * .
* *. * * * * * * * * * * * *. * * * * * * * * * * * * .

Thank you
John



Bernard Liengme

Count IF Formula
 
I can see that HHH appears 3 times in A and AGB twice.
How are the other columns involved
Maybe this is no a true representative subset of the data
best wishes
--
Bernard Liengme
http://people.stfx.ca/bliengme
Microsoft Excel MVP

"John" wrote in message
...
Hi All,

I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2"
and
"HHH" should be "3".

Column A Column B Column C
HHH 10 AGB
AGB 10 HHH
HHH 10 NNN
HHH 10 MMM
AGB 10 BBB
. . .
. . .
. . .

Thank you
John



Sean Timmons

Count IF Formula
 
In D1:

=countif(A:A,B1)

and paste down.

"John" wrote:

Hi All,

I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2" and
"HHH" should be "3".

Column A Column B Column C
HHH 10 AGB
AGB 10 HHH
HHH 10 NNN
HHH 10 MMM
AGB 10 BBB
. . .
. . .
. . .

Thank you
John


John

Count IF Formula
 
Hi Sean, thanks for the answer however I want to be able to write like
"SUMIF" but for "COUNTIF". =Countif(A:A,C2,B:B), I tried this formula and
does not work

"Sean Timmons" wrote:

In D1:

=countif(A:A,B1)

and paste down.

"John" wrote:

Hi All,

I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2" and
"HHH" should be "3".

Column A Column B Column C
HHH 10 AGB
AGB 10 HHH
HHH 10 NNN
HHH 10 MMM
AGB 10 BBB
. . .
. . .
. . .

Thank you
John


John

Count IF Formula
 
Hi Pete, thanks for the answer however I want to be able to write like
"SUMIF" but for "COUNTIF". =Countif(A:A,C2,B:B), I tried this formula and
does not work


"Pete_UK" wrote:

Try this in D1 (next to AGP):

=COUNTIF(A:A,C1)

and then copy down as required.

Hope this helps.

Pete

On Nov 17, 8:42 pm, John wrote:
Hi All,

I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2" and
"HHH" should be "3".

Column A Column B Column C
HHH 10 AGB
AGB 10 HHH
HHH 10 NNN
HHH 10 MMM
AGB 10 BBB
. . .
. . .
. . .

Thank you
John




Pete_UK

Count IF Formula
 
I'm not sure what you meant when you said you wanted to count column
B, but the formula will give you the answers that you quote in your
example.

Look in XL Help for COUNTIF, and you will see that the syntax you
quote is not correct.

Perhaps if you describe your requirements again and give realistic
values in B then we might be able to get a bit nearer to what you
want. Could it be that you only want to count the conditions if B is
not empty?

Pete

On Nov 17, 9:45*pm, John wrote:
Hi Pete, thanks for the answer however I want to be able to write like
"SUMIF" but for "COUNTIF". =Countif(A:A,C2,B:B), I tried this formula and
does not work



"Pete_UK" wrote:
Try this in D1 (next to AGP):


=COUNTIF(A:A,C1)


and then copy down as required.


Hope this helps.


Pete


On Nov 17, 8:42 pm, John wrote:
Hi All,


I have a problem below. I need to count if the value in column C equal to
value in column A then count column B. In this case "AGB" should be "2" and
"HHH" should be "3".


Column A * * * * Column B * * * * *Column C
HHH * * * * * * * * * *10 * * * * * * * * * * AGB
AGB * * * * * * * * * *10 * * * * * * * * * * HHH
HHH * * * * * * * * * *10 * * * * * * * * * * NNN
HHH * * * * * * * * * *10 * * * * * * * * * * MMM
AGB * * * * * * * * * * 10 * * * * * * * * * *BBB
* *. * * * * * * * * * * * *. * * * * * * * * * * * * .
* *. * * * * * * * * * * * *. * * * * * * * * * * * * .
* *. * * * * * * * * * * * *. * * * * * * * * * * * * .


Thank you
John- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com