|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
再做一遍吧
- Sub 删除空白行()
- Dim Arr(), Brr()
- Dim Dic As New Dictionary
- Dim i&, n&
-
- Arr = Range("A1:C" & Range("a" & Rows.Count).End(xlUp).Row).Value
- For i = 1 To UBound(Arr)
- If (Arr(i, 1) <> Empty) * (Arr(i, 1) <> "") Then
- Dic(i) = Array(Arr(i, 1), Arr(i, 2), Arr(i, 3))
- End If
- Next i
- Range("A:C").ClearContents
- Brr = WorksheetFunction.Transpose(WorksheetFunction.Transpose(Dic.Items))
- Range("A1").Resize(UBound(Brr), UBound(Brr, 2)).Value = Brr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|