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
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Don't type a true/false or 0/1 approximate match, just Lookupvalue, Tablearray, and Indexnum. There's also an optional NFPercent and Rank which you may not need to change, and Algorithm, which I think you should change to 2 (default is 3)

Here's an example (separate workbooks):


Excel 2010
BCDEFG
4Full Business Case (ABC) for programmeg
5quick west east (QWE)n
6xtra care variance (XCV)z
7Full Business Case (FBC) for programmer
8Full Business Case (JBC) for programmel
Sheet4



Excel 2010
PQ
6Approval - HMT FBCr
Sheet1
Cell Formulas
RangeFormula
Q6=FuzzyVLookup(P6,Sheet4!B$4:G$8,6,,2)
 
Last edited:
Upvote 0
I'm leaving work today but Ill look at this at home tomorrow - thanks again for all your help on this!
 
Upvote 0
I'm leaving work today but Ill look at this at home tomorrow - thanks again for all your help on this!

Hi Spreadsheet

I have tried the exact equation and I am getting an answer, although it was the wrong one...I changed the rank from 2 to 1 with no luck and finally 3 which worked 3. I tried another and it rankled 8 to get the right person

Any thoughts - I don't think I can use different ranks in each row (and I am slightly surprised at the rankings it is giving for the right answers

Thanks
Andy
 
Upvote 0
Are you able to post some sample data here?

Not really I'm afraid, although I can do titles - I work on data for projects

First spreadsheet where original data is located ie Approval - HMT FBC (B52)

  1. Reviews (column B)
  2. Client (column C)
  3. Project Responsibility (column D)
  4. Last Review Date (column E)

Range B7:E87

Second spreadsheet (range B9:G54), which is where the search is looking, so I am hoping 'Full Business Case (FBC) for programme' gets picked up by the fuzzy logic search on the term in spreadsheet 1, and then returns the person responsible (6) (=fuzzyvlookup(B52,'Project IAAP'!$B$9:$G$54,6,,3))


  1. Activity / Product (column B)
  2. Assurance/Approval Start Date (Column C)
  3. Assurance/Approval End Date (Column D)
  4. Last assurance/approval date (Column E)
  5. Next assurance/approval date (Column F)
  6. Person responsible (Column G)

Thanks
Andy
 
Upvote 0
Then can you try to change the confidential data or invent some with a similar pattern? If two strings are similar enough to match it should be possible via the above method. Otherwise, there are other advanced techniques such as regular expressions (also VBA).
 
Upvote 0
Here you go - it actually works on this one

Spreadsheet 1fuzzyvlookup(B12,$B$20:$G$25,6,,1)Mr Adam
BCDEFG
Reviews
(use as applicable)
ClientProject ResponsibilityLast Review Date
6AZX TR
7BBB LPCEO
8CCXZ JKCEO
9DPO RTCEO
10EGY GOCEO
11FYY GGCEO
12GGO DFCEO
13HXX GHCEO
14IZZ WECEO
15JXZ GOCEO
Spreadsheet 2
Activity / ProductAssurance/Approval Start dateAssurance/Approval End dateLast assurance/approval dateNext assurance/approval datePerson responsible
20AAABC GO01/02/197402/02/197402/02/197402/02/1980Mr Bill
21DDDEF01/02/197702/02/198302/02/198302/02/1986Mr Sid
22GGOGHI01/02/198102/02/198802/02/198802/02/1980Mr Adam
23JJJKLGG01/02/198802/02/199002/02/199002/02/2000Ms Sonia
24MMMNO01/02/199202/02/199902/02/199902/02/2009Ms Sarah
25PPPQR01/02/199902/02/200202/02/200202/02/2008Ms Linda

<tbody>
</tbody>
 
Upvote 0

Excel 2010
ABCDEF
1ReviewsClientProject ResponsibilityLast Review Date
2AZX TR#N/A#N/A
3BBB LPCEO#N/A#N/A
4CCXZ JKCEO#N/A#N/A
5DPO RTCEOMr Sid2/2/1983
6EGY GOCEOMr Adam2/2/1988
7FYY GGCEOMr Adam2/2/1988
8GGO DFCEOMs Sarah2/2/1999
9HXX GHCEOMr Bill2/2/1974
10IZZ WECEO#N/A#N/A
11JXZ GOCEOMs Sonia2/2/1990
12
13
14
15Activity / ProductAssurance/Approval Start dateAssurance/Approval End dateLast assurance/approval dateNext assurance/approval datePerson responsible
16AAABC GO1/2/19742/2/19742/2/19742/2/1980Mr Bill
17DDDEF1/2/19772/2/19832/2/19832/2/1986Mr Sid
18GGOGHI1/2/19812/2/19882/2/19882/2/1980Mr Adam
19JJJKLGG1/2/19882/2/19902/2/19902/2/2000Ms Sonia
20MMMNO1/2/19922/2/19992/2/19992/2/2009Ms Sarah
21PPPQR1/2/19992/2/20022/2/20022/2/2008Ms Linda
Sheet3
Cell Formulas
RangeFormula
C2=FuzzyVLookup($A2,$A$16:$F$21,6,,2)
D2=FuzzyVLookup($A2,$A$16:$F$21,4,,2)


The "algorithm" term is fixed. I see you've provided random text, but is there really no pattern that can be matched?
 
Last edited:
Upvote 0
Hi Sheetspread

Not really, it could just be a few letters ie FBC, as many of the reviews have 3-4 letter acronyms. In the second spreadsheet, it's more of a narrative and so terminology can be different ie FBC in full...I am not sure its possible to get this 100% right but I was hoping that FBC and those alike would be picked up and can't understand why higher ranked results have no reference to FBC / Approval etc at all...confused although feel solution close!
 
Upvote 0

Forum statistics

Threads
1,215,389
Messages
6,124,662
Members
449,178
Latest member
Emilou

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