Need help with countif

camilleso

New Member
Joined
Aug 14, 2019
Messages
15
Hi, I need help with a countif formula. I have one column of data with 458 rows; 4 options and want to count how many times each option shows up in the row.

Column A:
Option 1
Option 2
Option 3
Option 4
Option 1
Option 2
Option 3
Option 4
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
There's a follow up to my previous question. I also need help with creating a formula that will look for Option 1, Option 2, Option 3, Option 4 and if there is a 'Yes' next to them, sum that total. I want see how many 'Yes' exist in Option 1, Option 2, Option 3, Option 4 respectively.
 
Upvote 0
You mean something like PIVOT.

p9oPrUp.jpg
 
Last edited:
Upvote 0
A pivot table can produce this I guess. Since some information may change within this data set I didn't want to use a pivot and only stay on one page to view this data. If option 1 has a "yes" next to it, I want to count how many option 1 "yes" exist, same for option 2, 3 and 4.
 
Upvote 0
Something like this.


Excel 2013/2016
ABCDEF
1OPTIONSCount
2Option 11Option 12
3Option 21Option 22
4Option 31Option 32
5Option 41Option 42
6Option 11Option 50
7Option 21Total8
8Option 31
9Option 41
Sheet1
Cell Formulas
RangeFormula
F2=SUMIFS($B$2:$B$9,$A$2:$A$9,$E2)
B2=VALUE(IF(OR(A2=$E$2,A2=$E$3,A2=$E$4,A2=$E$5),"1","0"))
 
Upvote 0
Or,


Excel 2013/2016
ABCDE
1OPTIONSOPTIONSY/NCount Y/N
2Option 1Option 1YES2
3Option 2Option 2YES2
4Option 3Option 3YES2
5Option 4Option 4YES2
6Option 1Option 5NO0
7Option 2
8Option 3
9Option 4
Sheet1
Cell Formulas
RangeFormula
D2=IFERROR(IF(VLOOKUP(C2,$A$2:$A$9,1,0)=C2,"YES","NO"),"NO")
E2=IF(D2="YES",COUNTIF($A$2:$A$9,C2),"0")
 
Last edited:
Upvote 0
I have one column of data with 458 rows; 4 options and want to count how many times each option shows up in the row.
I want see how many 'Yes' exist in Option 1, Option 2, Option 3, Option 4 respectively.
To me that sounds like these 2 formulas copied down,

Excel Workbook
ABCDEF
1OptionYes/NoOptionCountCount with Yes
2Option 3YesOption 164
3Option 3YesOption 252
4Option 1YesOption 395
5Option 1YesOption 4126
6Option 1No
7Option 4Yes
8Option 3No
9Option 4Yes
10Option 3No
11Option 4Yes
12Option 1No
13Option 2Yes
14Option 1Yes
15Option 4No
16Option 3No
17Option 3No
18Option 2No
19Option 4No
20Option 2Yes
21Option 4No
22Option 2No
23Option 4Yes
24Option 3Yes
25Option 1Yes
26Option 3Yes
27Option 4No
28Option 4Yes
29Option 4No
30Option 4Yes
31Option 2No
32Option 3Yes
33Option 4No
Counts
 
Last edited:
Upvote 0
Peter_SSs, Yes, Yes, thats what OP wants. My brain dint work in that way. Thank you :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

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