Replace Cells With "/" of large Range Faster

JODomingos

New Member
Joined
Jul 11, 2020
Messages
48
Office Version
  1. 2016
Platform
  1. Windows
Hi Friends.

I have a large amount of cells that i need to replace the "/ " for empty. But when i try to perform this task by finding and replacing It takes too long (Hours).
Is there a way to speed up that? by doing in a VBA code for instance?

Thank you!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Do you have any worksheet events? Remove the worksheet events before doing find and replace.
 
Upvote 0
Do you have any worksheet events? Remove the worksheet events before doing find and replace.
This may not be necessary. There may be a reason that the code needs to be left left in there.
However, if Find/Replace is run via VBA code, events can be temporarily disabled, so that event procedure code will not kick off.

The structure of that would look something like this:
VBA Code:
Sub MyReplaceMacro()

'   Temporarily turn off event procedures
    Application.EnableEvents = False

'   Find/Replace code here

'   Turn events back on
    Application.EnableEvents = True

End Sub
The VBA code needed for the Find/Replace can be gotten by turning on the Macro Recorder, and performing those steps manually.
That will provide code needed for that part.
(It can be perfomed on a small range when recording, and we can expand it when editing that code to put it in our other procedure).
 
Upvote 0
If you are willing to use Power Query which is called Get and Transform in your version.
1. Highlight your range of data and bring into the PQ Editor
2. On the Transform Tab, select Replace
3. Fill in the text boxes
4. On the Home Tab, select Close and Load.

It is extremely fast.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,008
Members
448,935
Latest member
ijat

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