Hello Excel community!

I have spent almost a week and been to dozens of sites trying to figure out a formula that I'm sure would take some of you only a few minutes to complete.

The objective:
Get unique values from one column then filter it further by a second column.

The current formula in B2:B8 is an array formula (below) that indexes and dedupes the list in column D:

Formula: copy to clipboard
{=IFERROR(INDEX(D$2:D$26,MATCH(0,INDEX(COUNTIF($B$1:B1,D$2:D$26),0,0),0)),"")}


Attached Example XLSX: ArrayFormula-Test.xlsx


What I'm looking for now is to take the deduped list and then check to see if any of the values are in a second list in Column F where there is an "X" in Column G and filter those results out.

Screenshot of the above Excel Attachment: Screenshot 2014-05-28 10.37.31.png

I'm not sure if this is a nested IF statement or another Index/Match or a CountIF. I can do these functions separately but need it within a single array formula.

Any help would be greatly appreciated.

Thank you.