A
Adrien Huvier
Hi,
Le 27/03/2013 10:03, Claus Busch a écrit :
Wouldn't writing the formulae at once be even faster?
Sub Tester3()
Dim LRow As Long
Dim st As Double
st = Timer
LRow = Cells(Rows.Count, "E").End(xlUp).Row
Range("L1:L" & LRow).Formula = "=find(right(E1,13),E1)=8"
MsgBox Format(Timer - st, "0.000")
End Sub
Also, your new formula doesn't always give the same results as "=Mid(E1,
8, 13) = Right(E1, 13)", e.g. on strings like
ABCDEFGABCDEFGABCDEFGABCDEF or AAAAAAAAAAAAAAAAAAAA, but maybe it's ok
for the intended purpose.
Le 27/03/2013 10:03, Claus Busch a écrit :
still a little bit quicker:
Sub Tester3()
Dim LRow As Long
Dim st As Double
st = Timer
LRow = Cells(Rows.Count, "E").End(xlUp).Row
Range("L1").Formula = "=find(right(E1,13),E1)=8"
Range("L1").AutoFill Range("L1:L" & LRow)
MsgBox Format(Timer - st, "0.000")
End Sub
Wouldn't writing the formulae at once be even faster?
Sub Tester3()
Dim LRow As Long
Dim st As Double
st = Timer
LRow = Cells(Rows.Count, "E").End(xlUp).Row
Range("L1:L" & LRow).Formula = "=find(right(E1,13),E1)=8"
MsgBox Format(Timer - st, "0.000")
End Sub
Also, your new formula doesn't always give the same results as "=Mid(E1,
8, 13) = Right(E1, 13)", e.g. on strings like
ABCDEFGABCDEFGABCDEFGABCDEF or AAAAAAAAAAAAAAAAAAAA, but maybe it's ok
for the intended purpose.