Find and Replace - Quickest Option?

L

Lindsey M

Hi, in a previous post, I asked how could I delete data that was duplicated
over and over in a report that has approx 17,000 rows. It was suggested I do
a Find and Replace on these items. I've done this on one of the fields and it
does take a while to execute. Because there is approx 20 odd things that I
want to Find and Replace (with "" so they are then empty cells), this is
going to take quite a long time.

Has anyone got any suggestions on how I could speed this process up?

I have this for one field:

Columns("A:A").Select
Selection.Replace What:="Evaluation Overview Report cont.", Replacement:="" _
, LookAt:=xlPart, SearchOrder:=xlByRows
Columns("A:A").Select
Selection.Replace What:="Filter: Contact Birmingham", Replacement:="" _
, LookAt:=x1Part, SearchOrder:=x1ByRows

Also, anyone know the code to replace the above (say Filter: Contact
Birmingham with a field that will be say "Generated: Mar 03 2005" Where the
date will change) - is it possible to search on a field where only the first
five letters are taken into account?

Any help would be greatly appreciated,
Cheers
Linds
 
B

Bob Phillips

A bit better

Columns("A:A").Replace What:="Evaluation Overview Report cont.",
Replacement:="" _
, LookAt:=xlPart, SearchOrder:=xlByRows

sWhat = "Generated " & Format(TheDate, "mmm dd yyyy")
Columns("A:A")..Replace What:="Filter: Contact Birmingham", Replacement:=""
_
, LookAt:=x1Part, SearchOrder:=x1ByRows


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top