Countif formula???

motherteresa

Board Regular
Joined
Nov 11, 2010
Messages
81
Need help fellow Excellers...

Column G has either "A" or "B" placed in each row.

Column L has either "X" or "Y" placed in each row.

(The values above are internal coding. They could be any value, really)

Trying to calculate the percentage of "X's" that appear in column L that are assigned to "A" versus "B" in column G

So, given that column G contains 20 "A's" and the corresponding value in column L shows 15 "X's" and 5 "Y's", the result would be 75%

Thanks in advance for any help.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I tried this way maybe it will help:

Excel Workbook
GLMN
2AXA's16
3BYB's15
4BYX's18
5BXY's13
6BYTotal Rows31
7BXCount Matches11
8BY% of Matches35%
9BX
10AX
11AX
12AX
13AX
14AX
15AY
16AY
17AY
18BY
19AY
20AY
21AX
22AX
23AX
24AX
25AX
26BX
27BX
28BX
29BX
30BY
31BY
32BY
Sheet1
 
Upvote 0
How about
=COUNTIFS(G:G,"A",H:H,"X")/COUNTIF(G:G,"A")
 
Upvote 0
Fluff had it correct except for reference to column H it should be column L
 
Last edited by a moderator:
Upvote 0
Missed it was cols G & L, not G & H.
In which case


Excel 2013/2016
GLM
2AX0.75
3AY
4BY
5BX
6BY
7AX
8BY
9AX
10AX
11AX
12AX
13AX
14AX
15AY
16AY
17AY
18BY
19AY
20AX
21AX
22AX
23AX
24AX
25AX
26AX
27BX
Sheet2
Cell Formulas
RangeFormula
M2=COUNTIFS(G:G,"A",L:L,"X")/COUNTIF(G:G,"A")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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