EXCEL     1.含數字字母之編號   要重新由後排序到前面 2.並將二個產品編號(含上列重新排序之編號)合併成一個產品編號?

Attachment image

1 個解答

評分
  • 1 月前

    Sub test()

    Dim Rxa, Rxb As String

    Dim i, j, Rx As Long

    Columns("C:C").NumberFormatLocal = "@"

    For i = 2 To [A1048576].End(3).Row

    Cells(i, 3) = Cells(i, 1)

    Rxa = Cells(i, 2)

    Rx = Len(Cells(i, 2))

    For j = Rx To 1 Step -1

    Rxb = Mid(Rxa, j, 1)

    Cells(i, 3) = Cells(i, 3) & Rxb

    Next j

    Next i

    End Sub

還有問題嗎?立即提問即可得到解答。