How can I find last row that contains data in a specific column?

后端 未结 13 1766
南笙
南笙 2020-11-22 03:44

How can I find the last row that contains data in a specific column and on a specific sheet?

13条回答
  •  失恋的感觉
    2020-11-22 04:06

    You should use the .End(xlup) but instead of using 65536 you might want to use:

    sheetvar.Rows.Count
    

    That way it works for Excel 2007 which I believe has more than 65536 rows

提交回复
热议问题