Spped up find and Replace

keresztesi

Board Regular
Joined
Aug 14, 2017
Messages
64
Hi,

I have the following code for find and replace:

Sub CSERÉL()
Dim X As Long, WS As Worksheet, Words As Variant, Replacements As Variant
Words = Array("2017.08")
Replacements = Array("2017.09")
For Each WS In ActiveWindow.SelectedSheets
For X = LBound(Words) To UBound(Words)
WS.Cells.Replace What:=Words(X), Replacement:=Replacements(X), LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Next
Next
End Sub

The problem is that it needs really a lot of time to do that.
There are 25-30 sheets in my xls and on all sheets about 800 rows.
It takes a while until it finishes.

Unfortunately there is no chance to open all the reference files to speed up that way.

Any suggestions how to speed up the process?

Thx
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top