Search code examples
excelemailexcel-formulaarray-formulas

How to exclude records in excel that have specific attributes


I have a long list of email addresses in an excel sheet where the emails are in column A and I have colors in column B. For instance, see table:

   EMAIL                     COLOR
1. [email protected]          red
2. [email protected]          blue
3. [email protected]    blue
4. [email protected]    blue
5. [email protected]      red
6. [email protected]      blue

I can't figure out how to filter out or remove any email address that is associated with the color red without doing this manually (I have thousands of rows of data, so this isn't happening).

So in this case, the only email address I want to eventually import into my email program is [email protected]. Imagine there are thousands of rows like this - is there a conditional formula for column C that can lookup this relationship and provide a "true/false" flag for each email record?


Solution

    1. filter by color with criteria red
    2. copy all emails affiliated with color red to another column not attached to the first 2 columns (put a space between i.e. column F)
    3. add a 3rd column and do a vlookup by email =vlookup(a2,F:F,1,0)
    4. filter 3 columns by column C everything but #N/A and delete those rows

    enter image description here