- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-12-18
|
¦^´_ 1# f00l01
¤£ª¾¹D¬O§_¬°¼Ó¥D»Ý¨D¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁ¡C
Sub tt()
Dim Arr, Brr(), T%, T1%, L%, M%, i&, j&, C%
Columns("O:AA").ClearContents
Arr = [a1].CurrentRegion
ReDim Brr(1 To UBound(Arr), 1 To UBound(Arr, 2))
For i = 1 To UBound(Arr)
M = 0: L = 0: C = 0
For j = 1 To UBound(Arr, 2)
If j + 1 > UBound(Arr, 2) Then
If T1 = T + 1 Then Brr(i, M) = Mid(Brr(i, M) & "," & Arr(i, j), 2)
Exit For
End If
T = Arr(i, j): T1 = Arr(i, j + 1)
If T1 = T + 1 Then
If C = 0 Then M = M + 1
Brr(i, M) = Brr(i, M) & "," & Arr(i, j): C = 1
Else
If T > L + 1 Then GoTo 99
Brr(i, M) = Mid(Brr(i, M) & "," & Arr(i, j), 2): C = 0
End If
L = T
99: Next
Next
Range("o1").Resize(UBound(Brr), UBound(Brr, 2)) = Brr
End Sub |
-
-
Â^¨ú.PNG
(15.89 KB)
|