Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ella Campbell   on Oct 05 In MS Office Category.

  
Question Answered By: Ludano Ricci   on Oct 05

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.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Remove the spaces between characters in VBA Or get search suggestion and latest updates.


Tagged: