• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VB Code to put split and put text onto a new line

Capetonian

New Member
I'm new to VB in Excel and I need to split text onto new lines and in the same format each time. The information is refreshed from a CSV text file that is being used to make bookings based on an order number. This data is being manually captured and I do not have too much control over it. I want to automate this using VB and not using Text to Columns in Excel. I also need it on another line each time.

The data needs to be split onto a new line as per format A1000XXXX on one line. The examples I receive are in some cases correct e.g. A10005772 but in some others it is given as A10005502, 03, 04; which should be A10005502 on one line (with date), A10005503 on the next line (with date) and A10005504 (with date). The data example is below, with date in one column and order number in the next column:

2013/10/11 A1005502, 03, 04
2013/10/11 A10005772
2013/10/14 A10005713
2013/10/14 A10005846
2013/10/14 A10005554
2013/10/16 A10005702, A10005549
2013/10/14 A10005755
2013/10/14 A10005808, A10005781
2013/10/14 A10005634
2013/09/26 A10005779/5484/5783
Would anyone be able to provide any suggestions on this?
Thanks,
Capetonian
 
Understand by sample file a CSV text one 'cause I already have a procedure which imports a txt file​
and split data, better than manually capture …​
If your really prefer the procedure starts after the capture, upload a sample xls file​
and precise if the original data must be overwritten or split them in another range …​
___________________________________________________________________​
Question well formulated, solution guaranteed! (Robert Durupt)
 
Hi, Capetonian!
Killing one of the senders is an available option? If it is then choose the weakest, neediest, helpless, poorest, ... it's the most impressive example. I hope you won't need to repeat the process before all the remaining senders input the values in a proper way.
Regards!
 
Back
Top