String functions do not natively process arrays, so it must be "induced". If there are no blanks within your range, these (from Jaafar's code in Message
#4 ...
Code:
Range("A1:A10") = Evaluate("[B][COLOR="#FF0000"]IF({1},[/COLOR][/B]LEFT(" & Range("A1:A10").Address & ",3)[B][COLOR="#FF0000"])[/COLOR][/B]")
Code:
Sub LeftWithoutLoop(ByVal R As Range, ByVal Length As Long)
R = Evaluate("[B][COLOR="#FF0000"]IF({1},[/COLOR][/B]LEFT(" & R.Address & "," & Length & ")[B][COLOR="#FF0000"])[/COLOR][/B]")
End Sub
If, on the other hand, there could be blanks within your data, we need to test for them or else they will become zeros...
Code:
Range("A1:A10") = Evaluate("[B][COLOR="#FF0000"]IF(" & Range("A1:A10").Address & "="""","""",[/COLOR][/B]LEFT(" & Range("A1:A10").Address & ",3)[B][COLOR="#FF0000"])[/COLOR][/B]")
Code:
Sub LeftWithoutLoop(ByVal R As Range, ByVal Length As Long)
R = Evaluate([B][COLOR="#FF0000"]Replace([/COLOR][/B]"[B][COLOR="#FF0000"]IF(@="""","""",[/COLOR][/B]LEFT([B][COLOR="#FF0000"]@[/COLOR][/B]," & Length & "))"[B][COLOR="#FF0000"], "@", R.Address)[/COLOR][/B])
End Sub
Note: The above is untested, but I think I got it correct.