1、特殊单元格的具体参数如下图:

2、使用循环的方法删除空白行
Sub 删除空白行()
Dim x As Integer
Dim x As Integer
For x = Range("b" & Rows.Count).End(xlUp).Row To 1 Step -1
If IsEmpty(Cells(x, 2)) Then
Cells(x, 2).EntireRow.Delete
End If
Next x
End Sub
如下图


3、通过单元格的specialcells删除空白行
Range("b:b").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
如下图


1、在 Excel VBA 中, Offset 被拆分成了两个独立的函数。

2、以B3 为参照选取行数为5 列数为3 的单元格区域。

3、以Al 为参照表示B 所在单元格区域。
