- ©«¤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
|
¦^´_ 11# boblovejoyce - Option Explicit
- Sub Ex()
- Dim Rng As Range, Ar1(), x As Integer, Ar2(), i As Integer
- Dim Y As Integer, S As String
- Set Rng = [F1]
- Do While Rng <> ""
- i = 0: Y = 1: S = ""
- While Mid(Rng, Y, 1) Like "[A-z]" '¬O¦r¥À
- S = Mid(Rng, 1, Y)
- Y = Y + 1
- Wend
- If S <> "" And S = Mid(Rng.Offset(i), 1, Y - 1) Then
- ReDim Preserve Ar1(x + 1)
- ReDim Ar2(i)
- Ar2(i) = S
- Do While S = Mid(Rng.Offset(i), 1, Y - 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 = 1 To UBound(Ar1)
- ' [I1].Offset(i).Resize(, UBound(Ar1(i)) + 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 |
|