- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 8# boblovejoyce
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim Rng As Range, Ar1(), x As Integer, Ar2(), i As Integer
- Set Rng = [F1]
- Do While Rng <> ""
- i = 0
- If Mid(Rng, 1, 1) = Mid(Rng.Offset(i), 1, 1) Then
- ReDim Preserve Ar1(x + 1)
- ReDim Ar2(i)
- Ar2(i) = Mid(Rng, 1, 1)
- Do While Mid(Rng, 1, 1) = Mid(Rng.Offset(i), 1, 1)
- i = i + 1
- ReDim Preserve Ar2(i)
- Ar2(i) = Rng.Offset(i - 1, 1)
- Loop
- Ar1(x + 1) = Ar2
- Set Rng = Rng.Offset(i)
- x = x + 1
- End If
- Loop
- ReDim Ar2(i)
- For i = 0 To i
- Ar2(i) = IIf(i > 0, i, "")
- Next
- Ar1(0) = Ar2
- For i = 0 To UBound(Ar1)
- [I1].Offset(i).Resize(, UBound(Ar1) + 1) = Ar1(i) '¤@¦æ¤@¦æªº¼g¤J
- Next
- '*********** ¤@¦¸¼g¤J
- [I1].Resize(UBound(Ar1) + 1, UBound(Ar2) + 1).Value = Application.Transpose(Application.Transpose(Ar1))
- End Sub
½Æ»s¥N½X |
|