List of Unique Numbers Based on Multiple Criteria

TonyB1965

New Member
Joined
Sep 18, 2019
Messages
2
I need to look at data and return a list of unique numbers from column C where Column A, B match certain criteria. And a different set of returns where A,B, and D match certain criteria.

I have data that basically looks like this:

ABCD
Criteria1Criteria 2Criteria 3Criteria 4
hr
hpc
hr
hp
hr
hpc
hr
hp
hr
hp
hr
hp
vr
vpc
vr
vpc
vr
vp
vr
vp
vr
vpc
vr
vpc
vr

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]2[/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]22[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]2[/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]2[/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]8[/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]25[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]8[/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]22[/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]2[/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="align: right"]26[/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]

[TD="align: right"]7[/TD]
[TD="align: right"][/TD]

[TD="align: center"]13[/TD]

[TD="align: right"]0[/TD]
[TD="align: right"][/TD]

[TD="align: center"]14[/TD]

[TD="align: right"]12[/TD]
[TD="align: right"][/TD]

[TD="align: center"]15[/TD]

[TD="align: right"]88[/TD]

[TD="align: center"]16[/TD]

[TD="align: right"]13[/TD]
[TD="align: right"][/TD]

[TD="align: center"]17[/TD]

[TD="align: right"]88[/TD]

[TD="align: center"]18[/TD]

[TD="align: right"]12[/TD]
[TD="align: right"][/TD]

[TD="align: center"]19[/TD]

[TD="align: right"]88[/TD]
[TD="align: right"][/TD]

[TD="align: center"]20[/TD]

[TD="align: right"]13[/TD]
[TD="align: right"][/TD]

[TD="align: center"]21[/TD]

[TD="align: right"]15[/TD]
[TD="align: right"][/TD]

[TD="align: center"]22[/TD]

[TD="align: right"]18[/TD]
[TD="align: right"][/TD]

[TD="align: center"]23[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]24[/TD]

[TD="align: right"]20[/TD]
[TD="align: right"][/TD]

[TD="align: center"]25[/TD]

[TD="align: right"]4[/TD]

[TD="align: center"]26[/TD]

[TD="align: right"]26[/TD]
[TD="align: right"][/TD]

</tbody>


And I need results like this:

F

<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Result 1 (Cirteria 1=h and Criteria 2=r)[/TD]

[TD="align: center"]2[/TD]
[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: center"]8[/TD]

[TD="align: center"]4[/TD]
[TD="align: center"]7[/TD]

</tbody>



[TABLE="width: 85%"]
<tbody>[TR]
[TD]
F

<tbody>
[TD="align: center"]22[/TD]
[TD="align: center"]Result 5 (Cirteria 1=h and Criteria 2=p and Criteria 4 =c)[/TD]

[TD="align: center"]23[/TD]
[TD="align: center"]22[/TD]

[TD="align: center"]24[/TD]
[TD="align: center"]25[/TD]

</tbody>
[/TD]
[/TR]
</tbody>[/TABLE]


Would greatly prefer to use formulas and not VBA.

Thanks in advance if you can help.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
See if this works for you:


Book1
ABCDEFGHI
1Criteria1Criteria 2Criteria 3Criteria 4Criteria 1ResultsCriteria 1Results
2hr2h2h22
3hp22cCriteria 28Criteria 225
4hr2r7p
5hp2Criteria 4
6hr8c
7hp25c
8hr8
9hp22
10hr2
11hp26
12hr7
13hp0
14vr12
15vp88c
16vr13
17vp88c
18vr12
19vp88
20vr13
21vp15
22vr18
23vp3c
24vr20
25vp4c
26vr26
Sheet3
Cell Formulas
RangeFormula
I2=IFERROR(INDEX($C:$C,AGGREGATE(15,6,ROW($C$2:$C$26)/(($A$2:$A$26=H$2)*($B$2:$B$26=H$4)*($D$2:$D$26=H$6)*(COUNTIF(I$1:I1,$C$2:$C$26)=0)),1)),"")
G2=IFERROR(INDEX($C:$C,AGGREGATE(15,6,ROW($C$2:$C$26)/(($A$2:$A$26=F$2)*($B$2:$B$26=F$4)*(COUNTIF(G$1:G1,$C$2:$C$26)=0)),1)),"")
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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