I have a collection which has strings like:
130each 09/01/2017 09/01/2017
12each 09/01/2017 09/01/2017
1each 09/01/2017 09/01/2017
I get these values with the following code going through my excel sheet:
Dim col as New Collection
For i = 1 To lastRow
If InStr(ws1.Cells(i, 1), "each")
col.Add ws1.Cells(i, 1)
End If
Next i
Now I want to separate the strings after the first space and store each part in two separate collections. Example second collection and third collection should contain the following:
130each [at index 0 of col2]
09/01/2017 09/01/2017 [at index 0 of col3]
12each [at index 1 of col2]
10/11/2017 10/11/2017 [at index 1 of col3]
...so on
Any idea on how to approach this I know I will be looping through the collection but how will i seperate into two seperate collections after the first space?