SUM CountIFS

dragonmouse

Board Regular
Joined
May 14, 2008
Messages
129
Office Version
  1. 2016
Platform
  1. Windows
Simple question for the Pro's.

I have two columns A and B. Both Columns may contain Letters A-D. I want to count all the "A" In Column A and all the "A" in column B then add them together.

I tried using =COUNTIFS($A:$A,"A",$B:$B,"A") however it would only count one column. I tried using =SUM(COUNTIFS($A:$A,"A",$B:$B,"A")) but it's still only counting one column.

Priority (column A)New Pri (Column B)"A" PRI Count (formula)
AB
1​
AA
2​
BA
1​
CA
1​
DA
1​
AA
2​
BC
BC
BD
CA
1​
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
How about
Excel Formula:
=COUNTIFS(A:B,"A")
 
Upvote 0
How about=COUNTIFS(A:B,"A")
Ok...yes that works but not quite what I was looking for. My bad in describing my problem. I should have separated the columns more. In "reality" there is a column between the two that would NOT be counted. This formula adds columns A and B fine but If I have columns separated sucs as A and C it will add all THREE columns. I apologize but I didn't consider that in my example.

Priority (column A)Nothing of interest (Column B)New Pri (Column C)"A" PRI Count (formula) (Column D)
A1B1
A2A2
BD2A1
CA2A1
D5A1
A7A2
BD1C
BA1C
BB3D
CA7A1
 
Upvote 0
Could you have an A on it's own in col B?
 
Upvote 0
Could you have an A on it's own in col B?
It could be a possibility but I wouldn't want to count it.

I would need something that would "count any occurence of the letter "A" in column A, count any occurence of the letter "A" in column C THEN add them together".
 
Upvote 0
TEST FILE.xlsm
ABCD
1Priority (column A)Nothing of interest (Column B)New Pri (Column C)"A" PRI Count (formula) (Column D)
2A1B1
3A2A2
4BD2A1
5CA2A1
6D5A1
7A7A2
8BD1C0
9BA1C0
10BB3D0
11CA7A1
Sheet4
Cell Formulas
RangeFormula
D2:D11D2=IF(A2="A",1,0)+IF(C2="A",1,0)
 
Upvote 0
How about
Excel Formula:
=SUMPRODUCT((A2:A100="A")+(C2:C100="A"))
 
Upvote 0
Solution
Glad we could help & thanks for the feedback.
 
Upvote 0
=IF(A2="A",1,0)+IF(C2="A",1,0)
This did not work=IF(A2="A"...) gave me an error that it didn't recognize it as a formula

=SUMPRODUCT(($A:$A="A"))+($C:$C="A")) worked. A slight modification to "Fluff's" formula but the essence worked
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top