我试图获得如下I/O:
输入:123490
输出:BCDEJA
逻辑很简单:
如果
strarr(i)=0,1,2,3,4,5,6,7,8,9
那么
strarr(i) should be = A,B,C,D,E,F,G,H,I,J
码
str = .Cells(18, "B").Value
strarr() = Split(str)
For i = LBound(strarr) To UBound(strarr)
If strarr(i) = 0 Then
.Cells(24, "B") = "A" & .Cells(24, "B")
Else
If strarr(i) = 1 Then
.Cells(24, "C") = "B" & .Cells(24, "C")
Else
If strarr(i) = 2 Then
.Cells(24, "C") = "C" & .Cells(24, "C")
Else
If strarr(i) = 3 Then
.Cells(24, "D") = "D" & .Cells(24, "D")
Else
.
. …Run Code Online (Sandbox Code Playgroud)