I have a ugly export string coming from another script and I'm wondering if this is possible: E.g. if you have string:
row1_c1,row2_c1,row3_c1|row1_c2,row_2_c2,row3_c3
whats the easiest way to convert to:
row1_c1 row1_c2
row2_c1 row2_c2
row3_c1 row3_c2
If I copy-paste the string into Excel, the text-to-column conversion happens automatically. But how do I deal with the text-to-rows? Is this possible via UDF?
I tried:
Public Function SplitEnumbersDown(in_ As String)
Dim Enumbers() As String
Enumbers = Split(in_, ";")
Selection(1).Resize(UBound(Enumbers) + 1) = Application.Transpose(Enumbers)
End Function
But if I Change the export string to
=SplitEnumbersDown("row1_c1,row2_c1,row3_c1")|=SplitEnumbersDown("row1_c2,row_2_c2,row3_c3")
- this has a circular reference... Do I have a error somewhere?
I am aware of the text-to-column, and then paste Special with transpose, but I would like to have it done automatically.
So the end Goal is to copy paste the export string into Excel and automatically convert it.
