Both Split/Join and Replace both seem to handle the issue of multiple space
without difficulty. Here is some really bad test code that displays the
desired results:
Sub ab()
Dim s As String
Dim a As Variant
Dim b As String
s = "Hello folks, how y'all doing today???"
a = Split(s, " ")
b = Join(a, "")
MsgBox b ' the split/join method
MsgBox Replace(s, " ", "") ' the Replace method
End Sub
I like your function that has all that added functionality -- could come in
handy someday.