How to split a string with multiple delimiters in vba excel?

后端 未结 6 842
终归单人心
终归单人心 2021-01-01 14:53

I want to split a string with multiple delimiters using Excel VBA. One of the strings is:

d1-d2 d3 d4  

We have a dash and a space as tw

6条回答
  •  执笔经年
    2021-01-01 15:40

    Not allowed to comment (yet) but suggestion of using TRIM to eliminate a double space is not fully clear. The TRIM function in VBA only deletes leading and trailing spaces. It does not touch double spaces inside a string. You would have to use the worksheet function for that.

提交回复
热议问题