Power Query formula for partial matches

brawnystaff

Board Regular
Joined
Aug 9, 2012
Messages
109
Office Version
  1. 365
Tried using the following column/formula to look for matches in multiple fields (columns) based on a list of keywords:

Power Query:
List.ContainsAny({[Column1],[Column2],[Column3]},Keywords)

It does work, but only in cases where the entire cell matches the list of keywords. Looking for an alternative to show partial matches as well (e.g. "the" would find there, their, them, etc.). Any ideas? I known I can create a conditional column with various Text.Contains and elseif statements, but given number of columns and keywords that is time consuming to type up.

Thanks.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
What is inside Column1..Column3? Single words, phrases?
Does the partial match need to be case sensitive or not?
 
Upvote 0
Hi, I don't have time to create and test with some dummy data, but last year I was doing a similar text analysis for work. I found inspiration in these resources:
 
Upvote 0
Thanks. Had seen the MyOnlineTrainingHub link before, but each formula only does partial matches to one column. Regarding the other link, could not get that one to work either, but do believe perhaps there should be some type of Custom Function to make this work.

At this point, the work around I have used is to merge all columns into one column and use the following formula on it

Power Query:
List.Count(Splitter.SplitTextByAnyDelimiter(Keywords)([MergedColumns]))>1
 
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,048
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top