All data in the column A, content in each cell separated by comma. The numbers are from 1 to 4 or 1 to 1 to 5.
I would like to create the column B from column A.
Content of A2 is "4,1,2,3". I have to generate the content of B2 in the following way:

1. Searching for the number 1 in A2, its position in the cell is 2 (the second number), so the 1st number in B2 is 2,
2. Then searcing for the number 2 in A2, its position is 3, so the 2nd number in B2 is 3,
3. and so on.
The final result for B2 is: 2,3,4,1.

I am a bit confused with these arrays. I come across the Split and Join functions, so i wanted to use them. Thanks for any help in advance.
My trial as follows:

```
Sub convert()
Dim i, j, k As Integer
Dim Oldtxt
Dim Newtxt As Variant
Dim Newcontent As String
lastrow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To lastrow
Oldtxt = Split(Cells(i, 1), ",")
For k = 1 To UBound(Oldtxt) + 1
For j = 1 To UBound(Oldtxt) + 1
If CInt(Oldtxt(k)) = j Then Newtxt(CInt(j)) = k
Next j
Next k
Newcontent = Join(Newtxt, ",")
Cells(i, 2) = Newcontent
Next i
End Sub

```

[![enter image description here](https://i.stack.imgur.com/OvrOo.jpg)](https://i.stack.imgur.com/OvrOo.jpg)