|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Option Explicit
Sub TEST1()
Dim ar, br, i&, j&, strTxt$
strTxt = [F2].Value
If Len(strTxt) = False Then Exit Sub
If IsNumeric(strTxt) = False Then Exit Sub
ReDim ar(1 To 10, 0)
For i = 1 To UBound(ar)
If i = 1 Then
ar(i, 0) = strTxt
Else
ar(i, 0) = ar(i - 1, 0)
ReDim br(1 To Len(ar(i, 0)))
For j = 1 To UBound(br)
br(j) = Mid(ar(i, 0), j, 1)
If br(j) = "9" Then br(j) = 0 Else br(j) = br(j) + 1
Next j
ar(i, 0) = Join(br, "")
End If
Next i
Columns("F").ClearContents
[F2].Resize(10) = ar
Beep
End Sub
|
评分
-
1
查看全部评分
-
|