|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub TEST()
Dim Arr, Brr, i&, j%, N&
Arr = Sheets("Sheet1").UsedRange
ReDim Brr(1 To 20000, 1 To 7)
For i = 2 To UBound(Arr)
N = N + 1
For j = 1 To 7: Brr(N, j) = Arr(i, j): Next
For j = 8 To UBound(Arr, 2) Step 2
If Arr(i, j) & Arr(i, j + 1) = "" Then GoTo 101
N = N + 1: Brr(N, 3) = Arr(i, j): Brr(N, 4) = Arr(i, j + 1)
101: Next j
Next i
Sheets("Sheet2").UsedRange.Offset(1, 0).EntireRow.Delete
With [Sheet2!A2].Resize(N, 7)
.Value = Brr
.Borders.LineStyle = 1
Application.Goto .Item(1)
End With
End Sub
Xl0000626.rar
(10.33 KB, 下载次数: 56)
======================
|
|