Replicating Excel's "Match" Function
- 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
Hey all,
I'm just getting started with Alteryx and am having trouble replicating a simple excel function. I've looked on the community for an answer, but am not sure there is a topic that directly addresses this questions.
I would like to check whether a value in a specific cell (i.e. ABCDE123) exists in a column in another input file. This is very similar to excel's MATCH function combined with an ISNUMBER. If that value exists in the column, I'd like it to return "True". If not, I'd like it to return False.
Any help you could provide would be appreciated!
Best,
AB
Solved! Go to Solution.
- Labels:
- Fuzzy Match
- Join
- Preparation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can use "Contains"
Contains(String, Target, CaseInsensitive=1) Searches for the occurrence of a particular string within a string. Returns a TRUE or FALSE if the string matches the pattern. It is defaulted to case insensitive.
Example
Contains('123ABC', 'ABC') returns TRUE
Contains('123ABC', 'abc') returns TRUE
Contains('123ABC', 'abc', 0) returns FALSE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JohnJPS answer is probably best way to do it.
One formula to reproduce the Excel function is:
FindString([Field1], "123") != -1
This will return true if '123' is in the value (Field1) or false otherwise
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much! I was able to get the results I wanted.
However, a bit surprised an amazing/powerful program such as Alteryx doesn't have a simpler and more direct tool for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot!! I had the same doubt and your proposal helped me to solve it!!😊
