Inline code is significantly faster than procedeural calls. Software optimization must be incorporated during the development cycle, not just at the end. Use the Join function , it returns a string created by joining a number of substrings contained in an array. Use the Replace function , it returns a string in which a specified substring has been replaced with another substring a specified number of times. Use the InstrRev function , it returns the position of an occurrence of one string within another, from the end of string.
Multiplication is almost always faster than division.
You may need to sacrifice code reuseability to gain speed. Use the Filter function , it returns a zero-based array containing subset of a string array based on a specified filter criteria. Use the StrReverse function , it returns a string in which the character order of a specified string is reversed. Use Option Explicit . Even though all variables are Variants in VBCE, it is recommended that you use the Option Explicit statement in the Declarations section of your code modules so that any mis-spelled variable names will be caught by the IDE rather than getting undesired results at runtime.