Sub 刪除資料列中的空列()
Dim x As Long
For x = 2 To Range("a65536").End(xlUp).Row
If Cells(x, 1) = "" Then
Rows(x).Select
Selection.Delete Shift:=xlUp
End If
Next x
End Sub
Sub 刪除資料列中的空列()
Dim x As Long
For x = [a65536].End(xlUp).Row To 2 Step -1
If Cells(x, 1) = "" Then Rows(x).Delete
Next x
ActiveSheet.UsedRange '加入此指令,縮小滑桿(或儲存檔案也可)
End Sub