0% found this document useful (0 votes)
18 views1 page

Macro For Find and Replace

This is a Excel 2010 Macro that you can use for doing an effective Find Replace of Values from One sheet with an Input from Another

Uploaded by

Tausif Khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

Macro For Find and Replace

This is a Excel 2010 Macro that you can use for doing an effective Find Replace of Values from One sheet with an Input from Another

Uploaded by

Tausif Khan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

With the below Macro you would need to have the Index made in a Sheet where will have

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

Have questions email at [email protected]

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

You might also like