Excel counting unique value in mutiple values cells

Apple08

Active Member
Joined
Nov 1, 2014
Messages
450
Hi All

I like to count an unique value e.g. 'blue' from cells with multiple values such as red, blue.. And I need to separate the counting based on two criteria eg. A and X as shown below. Please could anyone give me an idea how to setup this formula. Many thanks.

AXred, blue
AYblue, green, yellow
AXblue
BYred, blue
BXblue, green, yellow
BYblue
CXred, blue
CYgreen
CXblue, green, yellow
Counting Result:
AXblue
2​
AYblue
1​
BXblue
1​
BYblue
2​
CXblue
2​
CYblue
0​
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Here is one method that works. As your profile doesn't shown an excel version, I've assumed that you have the latest one. If that is not the case then please update your profile.
Book1
ABCD
1AXred, blue
2AYblue, green, yellow
3AXblue
4BYred, blue
5BXblue, green, yellow
6BYblue
7CXred, blue
8CYgreen
9CXblue, green, yellow
10
11Counting Result:
12AXblue2
13AYblue1
14BXblue1
15BYblue2
16CXblue2
17CYblue0
Sheet6
Cell Formulas
RangeFormula
D12:D17D12=COUNT(FILTER(ROW(C1:C9),(A1:A9=A12)*(B1:B9=B12)*ISNUMBER(SEARCH(" "&C12&","," "&C1:C9&",")),""))
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,331
Members
449,077
Latest member
jmsotelo

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