Array of unique items by condition

Jon von der Heyden

MrExcel MVP, Moderator
Joined
Apr 6, 2004
Messages
10,907
Office Version
  1. 365
Platform
  1. Windows
Hiya.

Struggling a little with trying to geneate a list that is later to be linked to a combo box.

Using this list, I would like to create a list of unique items for Node_2 where Node_1="Crit1".
Book1
ABCDE
1Node_1Node_2Unique List
2Crit1Value1Value1
3Crit1Value2Value2
4Crit2Value3Value6
5Crit2Value4* need formula to produce unique list of Node_2 values where Node_1 = "Crit1". Notice no blank cells between values in unique list.
6Crit2Value5
7Crit1Value6
8Crit2Value7
9Crit2Value8
10Crit2Value9
Sheet1


Appreciate any help / referral.

Regards

:)
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Book2
ABCDE
10Crit1
2Node_1Node_2Idx3
3Crit1Value11Unique List
4Crit1Value22Value1
5Crit2Value3 Value2
6Crit2Value4 Value6
7Crit2Value5  
8Crit1Value63 
9Crit2Value7 
10Crit2Value8 
11Crit2Value9 
Sheet1


C1 must house a 0.

C3, coied down:

=IF(A3=$E$1,IF(ISNA(VLOOKUP(A3,$A$2:$B$2,2,0)),LOOKUP(9.99999999999999E+307,$C$1:C2)+1,""),"")

E2:

=LOOKUP(9.99999999999999E+307,C1:C11)

E4, copied down:

=IF(ROWS($E$4:E4)<=$E$2,LOOKUP(ROWS($E$4:E4),$C$3:$C$11,$B$3:$B$11),"")

The unique list in E can be referred to by a name...

Activate Insert|Name|Define.
Enter Crit1List in the Names in Workbook box.
Enter the following formula in the Refers to box:

=Sheet1!$E$4:INDEX(Sheet1!$E$4:$E$65536,MATCH("*",Sheet1!$E$4:$E$65536,-1))

Click OK.

Note that, if you want to extract multiple lists, say, for Crit1, Crit2, etc., a different setup is required.
 
Upvote 0
Aladin. I've just got round to this and since going through it thoroughly I can even understand it eventually! :) Thanks so much :biggrin:
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,268
Members
449,149
Latest member
mwdbActuary

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