Jan 17 2024 12:50 PM
Hi All
I need to filter out from the column A (a list of emails) all the non business emails.
In the column D I have the criteria (private emails to be excluded).
In the real case both column A and D are made of thousands items. (I have found in internet a list with thousands of private email providers domains).
If I use the Advanced filter as below, I can not get the desired effect.. probably because I can not add all the items of the criteria in the same column?
thx
Jan 17 2024 01:20 PM
=IF(SUM(N(ISNUMBER(SEARCH($D$2:$D$4,A2)))),"",A2)
A simple off-the-cuff alternative could be this formula. Enter the formula with ctrl+shift+enter if you don't work with Office 365 or Excel for the web or Excel 2021.
If you work with a recent version of Excel you can apply the FILTER function.
Jan 17 2024 02:33 PM
@MarcoTorinoi When using multiple "does not" criteria with Advanced Filter, you need to use "And" logic by arranging them horizontally on a single row with the column header ("email") repeated for each one:
With the criteria listed vertically in a single column you're using "Or" logic, which returns ALL records because <>"*@gmail.*" returns TRUE for all "yahoo" addresses and <>"*@yahoo.*" returns TRUE for all "gmail" addresses (they cancel each other out).
Jan 17 2024 02:37 PM
Jan 17 2024 02:41 PM - edited Jan 17 2024 02:55 PM
Thanks.. the issue is that I have tried to transpose from vertical to horizontal the list of the private emails (https://gist.github.com/ammarshah/f5c2624d767f91a7cbdc4e54db8dd0bf ) and gives an error.
It is probably because Excel can not transpose a list of 6000 items...
Jan 17 2024 03:13 PM
Solution@MarcoTorinoi Please see the attached workbook with the list of email provider domains arranged horizontally. With such a huge criteria list, performance may be an issue when applying it to a large dataset. You'll just have to test it to see how well it performs...
Jan 17 2024 03:36 PM
Jan 17 2024 03:56 PM
=IF(SUM(N(ISNUMBER(SEARCH($D$2:$D$3,A2)))),"",A2)
There are 2 criteria in your example in range D2:D3 therefore the formula has to reference D$2:$D$3.
Additionally since you don't work with Office 365 or Excel for the web or Excel 2021 you have to enter the formula as an arrayformula with ctrl+shift+enter. This will put the curly brackets { } around the formula. You can see the brackets highlighted in yellow in the screenshot from my Excel 2013 worksheet.
Jan 17 2024 04:07 PM
@MarcoTorinoi I'm not exactly sure where you went wrong with the copy/paste procedure. This is what I did:
Jan 18 2024 03:29 AM
Jan 17 2024 03:13 PM
Solution@MarcoTorinoi Please see the attached workbook with the list of email provider domains arranged horizontally. With such a huge criteria list, performance may be an issue when applying it to a large dataset. You'll just have to test it to see how well it performs...