Row count where data exists

前端 未结 7 1657
广开言路
广开言路 2021-02-08 19:24

I need to count the total number of rows that have data. I want to be able to use this on multiple sheets with different amounts of data rows.

I cannot figure out gener

7条回答
  •  星月不相逢
    2021-02-08 19:37

    lastrow = Sheet1.Range("A#").End(xlDown).Row
    

    This is more easy to determine the row count.
    Make sure you declare the right variable when it comes to larger rows.
    By the way the '#' sign must be a number where you want to start the row count.

提交回复
热议问题