|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Sub TEST1()
Dim ar, br(), i&, j&, r&
With Range("A1:C4")
ar = .Value
For i = 2 To UBound(ar) Step 2
For j = 1 To UBound(ar, 2)
If Len(ar(i, j)) = False Then
.Cells(i, j).Select
MsgBox "数据为空": Exit Sub
Else
r = r + 1
ReDim Preserve br(1 To r)
br(r) = ar(i, j)
End If
Next j
Next i
End With
With Sheets(2)
r = .Cells(Rows.Count, "A").End(xlUp).Row + 1
.Cells(r, 1).Resize(, UBound(br)) = br
.Activate
End With
Beep
End Sub
|
评分
-
3
查看全部评分
-
|