Assuming that range2 is actually a range of cells from which you are reading values, if you copy the contents of this range into an array and then read from the array instead of from the cells you should get even more of a speed up. This works because interacting with a cell is a lot slower than interacting with a variable.
kaiowas
Thanks. In theory you are right but I did that and it also took exactly 16 seconds with the IF statement and 10 minutes and 39 seconds without the IF statement( i.e. the same as not putting the values in an array)
Celia
I checked again. You are right - by putting the range2 values in an array, the run time is reduced from 16 seconds to 11 seconds.
Celia
Reduced the run-time to 16 seconds by changing to :-
For Each cell In range1
For Each thing In range2
If Len(cell) = Len(thing) And Left(cell, 1) = Left(thing, 1) Then
cell.Replace What:=thing, Replacement:=thing2, LookAt:=xlWhole
End If
Next
Next
Can't imagine why I didn't think of that in the first place.
Celia