开发者

Delete last / one specific row with what arguments?

I'm trying to delete the last row of an Excel spreadsheet, but I don't know the format of the argument to put into the rows.delete command. It keeps giving me an error.

LastRow = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows, SearchDirection:=xlP开发者_开发百科revious)
Rows("LastRow").Delete 'error type mismatch

Any suggestions to the argument for rows.delete?


Try this:

Range("a65536").End(xlUp).Select
Selection.EntireRow.Delete


LastRow.EntireRow.Delete  Shift:=xlShiftUp
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜