Hi,
I need to determine if certain row should be included or not. If the "Email Address" column only contains yahoo email address "don't include", if it contains yahoo email address and also other email address "include" this row. Thank you for your help.
Email Addresss | Notes |
john.andrew@yahoo.com | don't include |
fjlorenzo@gmail.com | include |
romylorenzo@gmail.com;maloudeguzman@yahoo.com | include |
joadaya@yahoo.com;thessdalmacio@gmail.com;janebuglosa@outlook.com | include |
thessdelacruz@yahoo.com | don't include |
Solved! Go to Solution.
Hi @fjlorenzo,
The quickest solution here is an If statement and replace all the @yahoo.com. Don't worry, it's not actually changing your original data.
IF REGEX_CountMatches(Replace([Email Addresss],'@yahoo.com',''),'@')
THEN 'include'
ELSE "don't include"
ENDIF
Hi @KaneG ,
Thank you so much. Would you be able to explain how this works? Just wanted to understand the IF statement how it works.
Regards,
Florence
Hi @fjlorenzo
Just stepping in with a quick explanation. What @KaneG's clever solution does is replace "@yahoo" with a blank and then the Regex_countmatches() function counts the number of remaining "@". If there's at least one, it means that the original had at least one non-yahoo address so the line is marked as include. If there are no matches, that means that the original has only yahoo address or no email addresses at all.
Very clever, indeed!
Dan