I am working on a workflow that would take a list of vendor names and key words and match them to another list of vendor names and item descriptions. A field would be added to the vendor name/item description list that would contain the key word or words that matched that particular item description.
I was able to create a batch macro that accomplished this but matched all key words to all item descriptions.
I want to make it a little more specific and match both a key word and a vendor name. For example, there may be multiple item descriptions (and vendor names) that contain keyword1 but I only want it to match if the vendor name matches also.
I was trying to create a similar macro but I needed multiple inputs - one for the vendor name and one for the key word
I have attached a sample workflow with sample text inputs for both the vendor/keyword list and the vendor and item descriptions. The desired output is also in the vendor/Item description text input file.
Solved! Go to Solution.
Hi @Robert31395,
Please find attached the workflow that follows your logic.
One important point in the results, row number 4 has a different result.
But in fact it should match according to the table "key word input"
Let me know if you have any questions
Best,
Vianney
Thank you for the quick reply. I would like to allow for the flexibility that the key words could also be key phrases. Your solution would work if it were limited to words but not sure it would work if it were generalized to allow phrases as well as words?
Thank you for identifying the error in my proposed output. Yes, line 4 should have the output you indicated.
Hi @Robert31395,
How would you identify between a key phrase and another?
If you use a delimiter like , or ; then you can apply it to the text to rows formula
Best,
Vianney
Hi @Robert31395,
Attached the workflow that follows your logic
In this case I decided to treat each phrase as a single word. To avoid wrong results I cleansed the data eliminating punctuation and white spaces.
Let me know if you have any questions
Best,
Vianney
Thank you for your revised solution. Because it treats it as individual words though, it matches some instances of the individual words where the entire phrase is not present so it is over inclusive. I was able to get a batch macro to work that gives the results I wanted.
that sounds great @Robert31395
Would you mind shearing it with the community for others to learn also
Best,
Vianney