|
- Sub JJJ()
- On Error Resume Next
- r = Range("a10000").End(3).Row
- ARR = Range("A1:B1").Resize(r)
- For I = 1 To UBound(ARR)
- For J = 1 To 4
- If ARR(I + J + 1, 1) <> ARR(I + J, 1) Then
- For JJ = 1 To J
- If J >= 3 Then ARR(I + JJ, 2) = JJ Else ARR(I + JJ, 2) = JJ + 2
- Next JJ
- Exit For
- End If
- Next J
- I = I + J - 1
- Next I
- Range("A1:B1").Resize(r) = ARR
-
- Range("B1").Resize(r).Replace "1", "甲"
- Range("B1").Resize(r).Replace "2", "乙"
- Range("B1").Resize(r).Replace "3", "丙"
- Range("B1").Resize(r).Replace "4", "丁"
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|