- Sub tt()
- For Each x In [a1:r1]
- If Len(x) Then s = s & x
- Next
- If Left(s, 1) = "0" Or Left(s, 1) = "5" Then Mid(s, 1, 1) = Mid(s, 2, 1)
- If Right(s, 1) = "0" Or Right(s, 1) = "5" Then Mid(s, Len(s), 1) = Mid(s, Len(s) - 1, 1)
- s = Replace(s, "5", "")
- For i = 1 To Len(s) - 1
- p1 = Mid(s, i, 1): p2 = Mid(s, i + 1, 1)
- If p1 = "0" Then p1 = p2
- If p2 = "0" Then p2 = p1
- Cells(7 + i, 1) = p1
- Cells(7 + i, 2) = p2
- Next
- End Sub
复制代码 |