The String$ function can replicate only 1-char strings, so it seems that you need a loop to duplicate strings that contain 2 or more characters. However, this is a one-liner that does the trick:
Function ReplicateString(Source As String, Times As Long) As String ' build a string of spaces whose length is equal to the number of ' repetitions, then replace each space with the string to be repeated ReplicateString = Replace$(Space$(Times), " ", Source)End Function
Note, however, that – depending on the length of the string and the number of repetitions – this approach might be slower than an optimized code based on a loop.