Msgbox WorksheetFunction.Trim("I love excel ") Msgbox WorksheetFunction.Trim(" I love excel") Msgbox WorksheetFunction.Trim(" I love excel ") To use the Excel Trim Function in VBA, call it by using WorksheetFunction: Sub TrimExample_4() However, the Excel Trim worksheet function can be used to remove extra spaces between words: However, the Trim function will not remove multiple spaces in between words: Sub TrimExample_3() VBA Trim will NOT Remove Multiple Spaces Between Words This includes trimming multiple spaces before and after text: Sub TrimExample_2() Trim Multiple Spaces Before and After Text
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |