Hi,
I have a data table with over 300K rows. In worksheet ("POS")column B i have values like "Zebra Tire" that i'd like to replace with "Zebra" or "Sumo Tires" with "Sumo". I tested below code however it didn't do anything. How can i replace the values in Column B with vba?
I have a data table with over 300K rows. In worksheet ("POS")column B i have values like "Zebra Tire" that i'd like to replace with "Zebra" or "Sumo Tires" with "Sumo". I tested below code however it didn't do anything. How can i replace the values in Column B with vba?
VBA Code:
Sub ReplaceName()
Application.ScreenUpdating = False
Worksheets("POS").Activate
Dim i As Long
Dim lr As Long
lr = Range("B" & Rows.Count).End(xlUp).Row
For i = lr To 2 Step -1
Range("B" & lr).Value = Replace(Range("B" & lr), "Zebra Tire", "Zebra")
Next i
Application.ScreenUpdating = True
End Sub