View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default code takes to long

Try running it by not selecting the range first?

With Range("C16:BJ17")
.Replace What:="ABC", Replacement:="XYZ", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
End With

--

Regards,
Nigel




"Scooter" wrote in message
...
Why does this code take about 4-5 minutes to excute? I does 4
replacements
for each cell.

Range("C16:BJ17").Select
Selection.Replace What:="ABC", Replacement:="XYZ", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False