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

后端 未结 13 1565
南笙
南笙 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

    Last_Row = Range("A1").End(xlDown).Row
    

    Just to verify, let's say you want to print the row number of the last row with the data in cell C1.

    Range("C1").Select
    Last_Row = Range("A1").End(xlDown).Row
    ActiveCell.FormulaR1C1 = Last_Row
    

提交回复
热议问题