0

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

1
  • 1
    So, soemthing not working with the approach you described? Are you getting errors? Please show your code and describe what is not working the way you expected. SO is not a free code writing service. Commented Nov 27, 2016 at 14:30

1 Answer 1

0
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
Sign up to request clarification or add additional context in comments.

2 Comments

Hi Ismail; your code might be correct, but with some context it would make a better answer; for example, you could explain how and why this proposed change would resolve the questioner's problem, perhaps including a link to the relevant documentation. That would make it more useful to them, and also more useful to other site readers who are looking for solutions to similar problems.
Hi Ismail; I got this logic. Actually problem i am facing is to write this in excel file as shown in the screen shot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.