I need a formula to return a unique list of values in (A3:A6) of values from (D2:D6) that are in the column (E:H) that match the criteria in (B1) and have an "x" in Rows (2:6). Need column searched to change based on value in (B1). Thank you
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[TD="align: center"]D
[/TD]
[TD="align: center"]E
[/TD]
[TD="align: center"]F
[/TD]
[TD="align: center"]G
[/TD]
[TD="align: center"]H
[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD="align: center"]Criteria
[/TD]
[TD="align: center"]Ice Cream
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Ice Cream
[/TD]
[TD="align: center"]Yogurt
[/TD]
[TD="align: center"]Sherbet
[/TD]
[TD="align: center"]Pastry
[/TD]
[/TR]
[TR]
[TD="align: center"]2
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Rob
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[/TR]
[TR]
[TD="align: center"]3
[/TD]
[TD="align: center"]Rob
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Maggie
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[/TR]
[TR]
[TD="align: center"]4
[/TD]
[TD="align: center"]Maggie
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Phil
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5
[/TD]
[TD="align: center"]John
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]John
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[/TR]
[TR]
[TD="align: center"]6
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Helen
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[TD="align: center"]D
[/TD]
[TD="align: center"]E
[/TD]
[TD="align: center"]F
[/TD]
[TD="align: center"]G
[/TD]
[TD="align: center"]H
[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD="align: center"]Criteria
[/TD]
[TD="align: center"]Ice Cream
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Ice Cream
[/TD]
[TD="align: center"]Yogurt
[/TD]
[TD="align: center"]Sherbet
[/TD]
[TD="align: center"]Pastry
[/TD]
[/TR]
[TR]
[TD="align: center"]2
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Rob
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[/TR]
[TR]
[TD="align: center"]3
[/TD]
[TD="align: center"]Rob
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Maggie
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[/TR]
[TR]
[TD="align: center"]4
[/TD]
[TD="align: center"]Maggie
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Phil
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5
[/TD]
[TD="align: center"]John
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]John
[/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"]x
[/TD]
[/TR]
[TR]
[TD="align: center"]6
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"]Helen
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]x
[/TD]
[/TR]
</tbody>[/TABLE]