justuptou
03-03-2017, 10:23 PM
In Excel VBA, I have the data (some sentences) from userform / Winword, how can I split the sentences by 'vbKeyEnter' and put it into array (or Cells) if i have not specified the Punctuation.
For example :
I have two pencils, (1st sentence, comma + vbKeyEnter)
I put them to my bag (2nd sentence, only vbKeyEnter)
and I go home. (3rd sentence, fullstop + vbKeyEnter)
Target result :
Range (B1) = I have two pencils,
Range (C1) = I put them to my bag
Range (D1) = and I go home.
For example :
I have two pencils, (1st sentence, comma + vbKeyEnter)
I put them to my bag (2nd sentence, only vbKeyEnter)
and I go home. (3rd sentence, fullstop + vbKeyEnter)
Target result :
Range (B1) = I have two pencils,
Range (C1) = I put them to my bag
Range (D1) = and I go home.