As the title suggests I have a currently working piece of code that I would like to adjust to make it have more of a fuzzy match feature.
Sub FillInBlanks()
Application.ScreenUpdating = False
Dim rng As Range
Dim rng2 As Range
Set rng = ActiveSheet.Range("C2:C9452")
Set rng2 = ActiveSheet.Range("D2:D9452")
For Each cell In rng
If IsEmpty(cell) Then
cell.FormulaR1C1 = "=VLOOKUP(Department!RC[-1],'All Titles'!C:C[1],2,)"
Sheets("Department").Columns(3).Copy
Sheets("Department").Columns(3).PasteSpecial xlPasteValues
End If
Next cell
For Each cell In rng2
If IsEmpty(cell) Then
cell.FormulaR1C1 = "=VLOOKUP(RC[-1],'All Titles'!C[-3]:C[-2],2,)"
Sheets("Department").Columns(4).Copy
Sheets("Department").Columns(4).PasteSpecial xlPasteValues
End If
Next cell
Range("B2").Select
Application.ScreenUpdating = True
End Sub
As you can see it does a vlookup to find a match. My problem is that it can only do exact matches with the other range. I would like to make it match based on a certain amount of likeness to the other data set. This eliminates countless issues with the minute differences in data. I'm aware this sounds excessively complicated and it may be out of my ability to implement but I figured it's worth a shot. I can't teach all off my colleagues how to use it so if I can keep it as just a click of a button that would be great.