user4501715
user4501715

Reputation:

Write data from text file having two delimited to Excel using VBScript

I have no knowledge of VBScript and need help.

Logically - I thought of splitting it with # in a for loop and then using : to split again.

Example:

Text file:

a : 21312 # asdfasd23sad : 43624 # asdsad*:21

Excel file:

enter image description here

Upvotes: 0

Views: 77

Answers (1)

Ismail
Ismail

Reputation: 89

Function arr()
input = a : 21312 # asdfasd23sad : 43624 # asdsad*:21
arr1 = Split(input, "#")

For i = Lbound(arr1) To Ubound (arr1)
 arr2 = Split(arr1(i),":")
 For j =  Lbound(arr2) To Ubound (arr2)
  Msgbox arr2(j)
 Next
Next
End function

Upvotes: 0

Related Questions