I want to find the acronym EW in a description field. It is only 2-letters and always in ALL CAPS.
I tried the the Contains([Description], "EW"). This seems to pickup anything that contains "ew" in a word.
What might be a more direct way of zeroing in on this and other acronyms?
Thanks
Solved! Go to Solution.
@hellyars you can use regex and place your pattern in a word boundary (\b pattern \b).
There's an optional third argument for the Contains function that will specify if you want the matching to be case sensitive. Try this formula:
Contains([Description],"EW",0)
Personally I would use the 'find and replace' tool to perform this task in append mode which you can then add a flag field too.
By default the find and replace tool is case sensitive though you can change that.
You would configure it to search 'any part of field'.
The benefit of the find and replace tool is you can easily extend this list to search for other values too.
Example attached.
Ben
Here is a twist. I expanded my keywords to include both EW and IA. How do use the Find Replace approach to account for records that might contain both keywords?
@BenMoss. I should clarify. My output in the Flag field is no longer a simple "Y". The output is now the acronym and there are more than one acronym.
Find | Flag |
EW | EW |
IA | IA |
NC3 | NC3 |
@BenMoss. Multiple keywords may appear in each 'description' field.
The macro works, but I see that it creates a duplicate record for those (original) records that contain more than one keyword.
How can it be modified to output comma separated results. Using your example to find bob and harry...
Field | Found |
bob and harry | bob, harry |
bob and smith | bob |
ron and veronica | null |
Thank you