Excel VBA remove blank row after cut

2019-09-10 02:02发布

I have this code which cuts and pastes an entire row to another sheet, how could I remove the blank row which now appears on the first sheet in which the original row was cut.

Set ASR = ActiveWorkbook.Sheets("Main")
Set LS = ActiveWorkbook.Sheets("Exclusions")

ASR.cells(i, "C").EntireRow.Cut Destination:=LS.Range("A" & LS.Rows.Count).End(xlUp).Offset(1)

I was hoping this line of code which I got from this answer would remove the blank rows, but it did not work

ASR.cells.Delete Shift:=xlUp

1条回答
做自己的国王
2楼-- · 2019-09-10 02:35

ASR.cells(i, "C").EntireRow.delete

查看更多
登录 后发表回答