Q:

How to find multiple values in column

I have problem with matching in excel file. Let me explain it on an example:
COL1 COL2    COL3 COL4 COL5 
AA11 First   AA11 ???? ???
BB22 First   BB22 
AA11 Second
BB22 Third

COL1 - User's indexes
Col2 - User's groupName
Col3 DISTINCT user's indexes
Col4,5... Values that i'm looking for

I'm looking for formulas for following cases:
Column 4: IF user with index COL3 has groups(COL2) 'FIRST' AND 'SECOND' add value = 'LEVEL1'
Column 5: IF user with index COL3 has groups(COL2) 'FIRST' AND 'THIRD add value = 'LEVEL2'

A:

I would use COUNTIFS wrapped in an IF:
Column 4:
=IF(SUM(COUNTIFS(A:A,C1,B:B,{"First","Second"}))>=2,"Level 1","")

Column 5:
=IF(SUM(COUNTIFS(A:A,C1,B:B,{"First","Third"}))>=2,"Level 2","")

