I have a big problem with replacing data in an Excel-sheet. There are more that 6000 keyword and more that 300000 rows in the main sheet. I have to replace those keywords in the next row of the original text row. I am trying this formula:
Sub ReplaceExample()
Dim OriginalText As String
Dim CorrectedText As String
OriginalText = Range("A2").Value
CorrectedText = Replace(OriginalText, "left", "Left")
CorrectedText = Replace(OriginalText, "limited", "Limited")
Range("A2").Offset(, 1).Value = CorrectedText
End Sub
But I am having a problem with Range()
.
I have a huge data range in the Excel-sheet.
Can I use a single formula for all those replacements???
For Example: this is a sample data for original text cell Number (A2:A12)
00-00 Buick Lesabre (limited) headlight Set;
00-00 Buick Lesabre Tail Light left;
00-00 Buick Lesabre Tail Light Pair;
00-00 Buick lesabre tail Light Right;
00-00 Buick Lesabre Tail Light Set;
00-00 Dodge /Plymouth Neon Fog Light Pair;
00-00 Dodge caravan/Plymouth voyager/ Chrysler towncar(W/ Quad) Headlight Left;
00-00 Dodge Caravan/voyager /Towncar(W/O Quad&Dtrl)Headlight Set;
00-00 Dodge/Plymouth Neon Fog Light Left;
00-00 Dodge/Plymouth Neon Fog Light Right;
2000 Nissian 350z;
Keywords cell number (A2:A8)
Limited;
Left;
Lesabre;
Caravan;
Voyager;
350Z;
Towncar
I need to solve it quickly.