Creating a dynamic list of unique values in a range with a condition

GuyGadois

Active Member
Joined
Jan 12, 2009
Messages
344
Office Version
  1. 2019
Platform
  1. Windows
I apologize, but I cannot get XL2BB to work right now. Excel hangs when the Add-on is enabled. :(

I have the following sheet, where I am trying to create a unique list of values from the values in Column A if the corresponding value in Column B says "Yes." The dynamic list would start in Column C and just contain values in column A if column B equals "Yes". Is there a formula I can use to accomplish this?

Cheers,

Guy



Component ADynamic List
Product 1Product 3
Product 2Product 12
Product 3YesProduct 21
Product 4Product 28
Product 5Product 34
Product 6
Product 7
Product 8
Product 9
Product 10
Product 11
Product 12Yes
Product 13
Product 14
Product 15
Product 16
Product 17
Product 18
Product 19
Product 20
Product 21Yes
Product 22
Product 23
Product 24
Product 25
Product 26
Product 27
Product 28Yes
Product 29
Product 30
Product 31
Product 32
Product 33
Product 34Yes
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
The easiest is using a pivot table in 2019.
 
Upvote 0
I was hoping to avoid using pivot tables on this sheet. Are there no formulas to accomplish what I am looking to do?
 
Upvote 0
The FILTER function available in 2021 makes it easy but you can try this. It's not entirely dynamic. You'd need to pull down until you get an error.
Book2
ABCD
1ProdBoolList
2Product 1Product 3
3Product 2Product 12
4Product 3YesProduct 21
5Product 4Product 28
6Product 5Product 34
7Product 6
8Product 7
9Product 8
10Product 9
11Product 10
12Product 11
13Product 12Yes
14Product 13
15Product 14
16Product 15
17Product 16
18Product 17
19Product 18
20Product 19
21Product 20
22Product 21Yes
23Product 22
24Product 23
25Product 24
26Product 25
27Product 26
28Product 27
29Product 28Yes
30Product 29
31Product 30
32Product 31
33Product 32
34Product 33
35Product 34Yes
Sheet1
Cell Formulas
RangeFormula
D2:D6D2=INDEX($A$2:$A$35,AGGREGATE(15,6,ROW($B$2:$B$35)-ROW($B$2)+1/($B$2:$B$35="Yes"),ROWS($1:1)))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
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