Sub 轉出()
Dim R&, xR As Range, xH As Range, xE As Range
R = [標籤清單!A65536].End(xlUp).Row
If R < 2 Then Exit Sub
Set xH = [標籤樣式!A4]: Set xE = xH
For Each xR In [標籤清單!A2].Resize(R - 1)
If xH = "" Then [標籤樣式!1:3].Copy xE
xE(2, 2) = xR(1)
xE(3, 2) = xR(2)
Set xE = xE(1, 3)
If xE = "" Then Set xH = xH(4): Set xE = xH
Next
[標籤樣式!1:3].EntireRow.Delete
Application.Goto [標籤樣式!A1]
End Sub作者: GBKEE 時間: 2015-9-14 20:13