Need a true/false or 1/0 for if a given index has a specific set of values across multiple rows

Blizzisme

New Member
Joined
Jul 9, 2018
Messages
5
[TABLE="width: 500"]
<tbody>[TR]
[TD]Users[/TD]
[TD]Colors[/TD]
[/TR]
[TR]
[TD]User 1[/TD]
[TD]Blue
[/TD]
[/TR]
[TR]
[TD]User 1[/TD]
[TD]Pink[/TD]
[/TR]
[TR]
[TD]User 1[/TD]
[TD]Green[/TD]
[/TR]
[TR]
[TD]User 2[/TD]
[TD]Blue[/TD]
[/TR]
[TR]
[TD]User 2[/TD]
[TD]Pink[/TD]
[/TR]
[TR]
[TD]User 3[/TD]
[TD]Blue[/TD]
[/TR]
[TR]
[TD]User 4[/TD]
[TD]Blue[/TD]
[/TR]
[TR]
[TD]User 4[/TD]
[TD]Pink[/TD]
[/TR]
[TR]
[TD]User 4[/TD]
[TD]Green[/TD]
[/TR]
</tbody>[/TABLE]

I have another table which has a list of users and I want it to say yes/no as to whether they have the full set of colors (Blue, Pink, AND Green).

i.e.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Users[/TD]
[TD]Full Color Allocation[/TD]
[/TR]
[TR]
[TD]User 1[/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD]User 2[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]User 3[/TD]
[TD]No[/TD]
[/TR]
[TR]
[TD]User 4[/TD]
[TD]Yes[/TD]
[/TR]
</tbody>[/TABLE]

What formula do I use to parse the first table to fill in the second one?


Thanks.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Assuming each user will appear only 1 with each individual color:

=SUM(COUNTIFS(A:A,E1,B:B,{"Blue","Pink","Green"}))=3


Excel 2010
ABCDEF
1User 1BlueUser 1TRUE
2User 1PinkUser 2FALSE
3User 1GreenUser 3FALSE
4User 2BlueUser 4TRUE
5User 2Pink
6User 3Blue
7User 4Blue
8User 4Pink
Sheet1
Cell Formulas
RangeFormula
F1=SUM(COUNTIFS(A:A,E1,B:B,{"Blue","Pink","Green"}))=3
F2=SUM(COUNTIFS(A:A,E2,B:B,{"Blue","Pink","Green"}))=3
F3=SUM(COUNTIFS(A:A,E3,B:B,{"Blue","Pink","Green"}))=3
F4=SUM(COUNTIFS(A:A,E4,B:B,{"Blue","Pink","Green"}))=3
 
Last edited:
Upvote 0
Thanks Scott, that looks like what I need, now I just need to make it work.
I am testing with values that I know go together, and it is returning 0.
Please see the attached image, maybe you can see what I am doing wrong.
b2WZP8
b2WZP8
table1.jpg


Also, before manually entering the search criteria, I tried to create a series of cells where I could put the patterns I wanted to match and it would not allow me to select a cell in place of a text string. Any way to make it work with something like "=SUM(COUNTIFS(A:A,E1,B:B,{L1,L2,L3}))=3"
 
Upvote 0
Just realised the row numbers were cut off. K11 is the cell my formula is in right now, and K10 is where I put the name of the user.
 
Upvote 0
The plot thickens... If I type in the name, and type all of the matching cases, then it returns the correct count. If I try and point it to other cells it returns 0 if I use the username that way, and gives an error if I try and point the matching cases to cells.
 
Upvote 0
Try to post your sample in an Excel readable form directly here in the form along with the results which must obtain from that sample.
 
Upvote 0
Try to post your sample in an Excel readable form directly here in the form along with the results which must obtain from that sample.

Thank you all for your assistance. I updated my query to clear all formatting, and now the comparison works. Got everything running (more or less) now... The remaining problems are ones of logic. I need to actually figure out the workflow for what I want it to do.

Much appreciated.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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