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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Sheetspread

Thanks for your help - looks like I will have to do manually as I am not a VBA person

Thanks for helping
Andy
 
Upvote 0
No need to be, really, just paste it into the VBE and go........


Thanks, I feel to bend my datasets into the VBA code will take too long, but I have sent tot code to a collegue who is an expert so hopefully we can use at a later date

Thanks
Andy
 
Upvote 0
Thanks, I feel to bend my datasets into the VBA code will take too long, but I have sent tot code to a collegue who is an expert so hopefully we can use at a later date

Thanks
Andy

Andy,

The fuzzy is actually pretty easy, just select which "Algorithm" you want to use in the formula.
This code that you paste in the vba can be seen as a custom formula.

So whenever you than use =fuzzy cell;cell;1 or 2 or 3(3 does both).
It will go into your vba to look what it needs to execute.

Biggest advantage of fuzzy is that you can set it to look for letter or word match (if i'm not mistaken)

Greetz
 
Upvote 0
are you saying that the code allows the existence of the fuzzylookup equation with no changes to the code to match my dateset?

I have to go to a meeting now but will be back by 1.30 UK time.....
 
Upvote 0
Yes, paste the code in a module, then on the worksheet type a vlookup formula as you did before except with the word fuzzy in front. Stating a confidence level is optional.
 
Last edited:
Upvote 0
Yes, paste the code in a module, then on the worksheet type a vlookup formula as you did before except with the word fuzzy in front. Stating a confidence level is optional.

Hi Spreadsheet

I have added to the VBA editor and added fuzzy to the lookup equation. I was hoping that the 'FBC' part of 'Approval - HMT FBC' in the first workbook would be found in 'Full Business Case (FBC) for programme' in the second workbook, and then the equation would return the contents of the cell 6 columns from it, in this case someones name

Instead I got '*** 'NFPercent' must be a percentage > zero ***', which I assume is part of the macro code itself

Is this because I have only added the code to the first workbook? or is there something else I have not actioned

Thanks
Andy
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,736
Members
448,988
Latest member
BB_Unlv

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