How to install your new code
- Copy the Excel VBA code
- Select the workbook in which you want to store the Excel VBA code
- Press Alt+F11 to open the Visual Basic Editor
- Choose Insert > Module
- Edit > Paste the macro into the module that appeared
- Close the VBEditor
- Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
Sub ApproximateMatchReplacement()
Application.ScreenUpdating = False
With Range("H2:H" & Range("G" & Rows.Count).End(xlUp).Row)
.Formula = "=IFERROR(LOOKUP(2,1/SEARCH($A$3:$A$19,G2),$B$3:$B$19),G2)"
DoEvents
.Value = .Value
End With
Application.ScreenUpdating = True
End Sub
Bookmarks