Convert number to specifi order

button to convert
dATA IN COLUMN  A ( all column A)  need  be convert
 
to this order

2 4 6 8 0 then 1 3  5  7 9

as show
aa1111.PNG
file here
8976453_CTO.xlsx
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?
 
Ryan ChongCommented:
try create a custom function:

Function ReOrder(v As String) As String
    Dim tmpArr(9) As String
    For i = 1 To Len(v)
        Select Case Mid(v, i, 1)
        Case "2"
            tmpArr(0) = tmpArr(0) & "2"
        Case "4"
            tmpArr(1) = tmpArr(1) & "4"
        Case "6"
            tmpArr(2) = tmpArr(2) & "6"
        Case "8"
            tmpArr(3) = tmpArr(3) & "8"
        Case "0"
            tmpArr(4) = tmpArr(4) & "0"
        Case "1"
            tmpArr(5) = tmpArr(5) & "1"
        Case "3"
            tmpArr(6) = tmpArr(6) & "3"
        Case "5"
            tmpArr(7) = tmpArr(7) & "5"
        Case "7"
            tmpArr(8) = tmpArr(8) & "7"
        Case "9"
            tmpArr(9) = tmpArr(9) & "9"
        End Select
    Next
    ReOrder = Join(tmpArr, "")
End Function

Open in new window


then apply it using:

=ReOrder(B7)

Open in new window

8976453_CTO_b.xlsm
1
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Great JOB  

Best Expert !
0
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Ryan Chong

Thnaks for the fas reponse
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.