- ©«¤l
- 967
- ¥DÃD
- 0
- ºëµØ
- 0
- ¿n¤À
- 1001
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN XP
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-11-29
- ³Ì«áµn¿ý
- 2022-5-17
|
¦^´_ 11# tonycho33
Option Explicit
Sub Ex()
Dim R As Integer, R1 As Integer, Rng As Range, Rng1 As Range, a As Range
For Each a In Sheets("¥DÀÉ").UsedRange
a.Value = Trim(a)
Next
R = 2: R1 = 2
Sheets("¬ö¿ýÀÉ").UsedRange.Offset(1).Clear
Sheets("¥DÀÉ").Activate
Do
Set Rng = Sheets("¥DÀÉ").Range(Cells(R, "D"), Cells(R, "D").End(xlToRight)).Resize(3)
With Sheets("¬ö¿ýÀÉ")
.Cells(R1, "A") = Cells(R, "A")
.Cells(R1, "B") = Cells(R, "B")
R1 = R1 + 1
.Cells(R1, "C").Resize(Rng.Columns.Count, 3) = Application.Transpose(Rng)
.Cells(R1, "G").Resize(Rng.Columns.Count) = Cells(R, "C")
R1 = R1 + Rng.Columns.Count
End With
R = R + 3
Loop While Cells(R, "D") <> ""
End Sub |
|