Partial matches

plant007

Board Regular
Joined
Jun 2, 2011
Messages
55
Office Version
  1. 2019
Platform
  1. Windows
Hi

I am really struggling with matching text strings across two datasets which use different terminology. I have used a vlookup (within an IF and ISNA), with wildcards to match certain text strings but this only works when the original text string is part of the second text string ie SoS is part of ABC SOS DEF, but most of the matches I need to make are as follows;

GHI SOS JKL as part of ABC SOS DEF

which means I need to match 3-4 contiguous letters within both text strings, without using macros

Any help would be most appreciated

Thanks
Any
 
As Alan said:

Algorithm
Defines the algorithm to be used for matching strings. Valid values are 1, 2 or 3:
Algorithm = 1
This algorithm is best suited for matching mis-spellings.
For each character in 'String1', a search is performed on 'String2'.
The search is deemed successful if a character is found in 'String2' within 3 characters of the current position.
A score is kept of matching characters which is returned as a percentage of the total possible score.
Algorithm = 2
This algorithm is best suited for matching sentences, or 'firstname lastname' compared with 'lastname firstname' combinations.
A count of matching pairs, triplets, quadruplets etc. in 'String1' and 'String2' is returned as a percentage of the total possible.
Algorithm = 3: Both Algorithms 1 and 2 are performed.
Default: 3

NFpercent
The Percentage value below which matching strings are deemed as not found. If no strings in the lookup table equal or exceed this matching percentage, #N/A is returned.
The higher the percentage specified, the higher the confidence level in the returned result.
Default: 5%

Rank
An optional parameter which may take any value > 0 and causes the function to return the specified ranking best match.
Default: 1

Algorithm 2 sounds like what you want, but it's hard to be sure without seeing your data.

can't understand why higher ranked results have no reference to FBC / Approval etc at all.

There's the misspelling vs word order problem....
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I read these and it may be best to give an example, after changing to algorithm 2 and reducing NFpercent ot 0.01, using rank 1;

I searched for 'Approval - HMT OBC' and instead of picking up 'Outline Business Case (OBC) for programme', it picks up 'Appraisal of Sustainability (AoS) - Assurance Report of ACs Sustainability Appraisal Report'...I assume it is picking up the APPR (appears twice) section rather than the OBC section?

There is unfortunately like this example, no regularity
 
Upvote 0
Ideally you'd have a three letter acronym in parentheses in each or a list you could match to. Otherwise you are going to need a lot of visual inspection along with the formula (which is hopefully much better than nothing).
 
Upvote 0
tried the list with three acronyms / parentheses and picking up lots of wrong answers - have a feeling its going to be a manual process:(
 
Upvote 0

Forum statistics

Threads
1,215,377
Messages
6,124,598
Members
449,174
Latest member
chandan4057

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