ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Separating Words From a Text String (https://www.excelbanter.com/excel-programming/337609-separating-words-text-string.html)

vqthomf

Separating Words From a Text String
 
Hi I am trying to separate word from a text string Damage,Scratch,F-F,In-Ops
into variables I have tried The Mid Function with Instr, but I am finding it
most difficult.
Can anybody help me please Thanks
Charles

Charlie

Separating Words From a Text String
 
in VBA the Split function will split the string on commas into a zero-based
array

Dim MyList() As String

MyList = Split("Damage,Scratch,F-F,In-Ops", ",")

For i = 0 To UBound(MyList)
Debug.Print MyList(i)
Next i



"vqthomf" wrote:

Hi I am trying to separate word from a text string Damage,Scratch,F-F,In-Ops
into variables I have tried The Mid Function with Instr, but I am finding it
most difficult.
Can anybody help me please Thanks
Charles



All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com