To find matches between two columns - if column 1 is contained within column 2
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I need some help with how to find "Matches" and "No Matches" between two fields.
I have been using the "if contains" formula however this is not giving me the desired output.
Example below:
Column 1 and 2 show what the inputs are, and column 3 is what the desired output should show. However the last column is showing what the current if contains statement is showing.
COLUMN 1 | COLUMN 2 | MATCH? | CURRENT IF STATEMENT RETURNS: |
NONE | NONE1 | MATCH | NO MATCH |
12208937 | 12208937A | MATCH | NO MATCH |
UNKNOWN | UNKNOWN71 | MATCH | NO MATCH |
21700000170201 | 170201 | NO MATCH | MATCH |
I am really not sure if this is possible. I have a number of columns containing "NONE" or "UNKNOWN" and with this the 1/71 at the end shows the number of times this "unknown" is used. This needs to remain however needs to be shown as a "match".
Any advice would be appreciated!
Solved! Go to Solution.
- Labels:
- Datasets
- Developer
- Fuzzy Match
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Lauren_Holmes,
I think perhaps you have the conditions reversed in the Contains() function?
In the Contains function we have a "string" and "target". The string is the field we're looking for the target value in. Therefore in your case the string field is Column2 and target field is Column1.
IF Contains([COLUMN 2], [COLUMN 1])
THEN 'MATCH'
ELSE 'NO MATCH'
ENDIF
I've attached my workflow for you to download if needed!
Kind regards,
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
One day my brain will start working! Why I didn't try this before, thank you for letting me know! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No problem at all! 🙂
