Macro For Find and Replace
Macro For Find and Replace
to put the text you want to Replace with another text. You can have the below in 1 sheet (Index) and in another Sheet you can have the Raw Data. Original Text Car Bike Cycle Replacement Text 4tyres 2Thin Tyres 2 Alloy wheels
Option Explicit Sub Find_N_Replace() Dim Find As Variant Dim Replace As Variant
Application.ScreenUpdating = False
Sheets("Index").Select Range("A2").Select Do Until IsEmpty(ActiveCell) Find = ActiveCell.value ActiveCell.Offset(0, 1).Select Replace = ActiveCell.value Sheets("Raw").Select Cells.Replace What:=Find, Replacement:=Replace, _ LookAt:=xlWhole, MatchCase:=False Sheets("Index").Select ActiveCell.Offset(1, 0).Select ActiveCell.Offset(0, -1).Select Loop Sheets("Raw").Select Range("A2").Select Application.ScreenUpdating = True MsgBox ("Cheers") End Sub