Find last row in range

前端 未结 11 2040
傲寒
傲寒 2020-12-02 00:41

I\'m having a little trouble with finding the last row.

What I am trying to do is find the last row in column "A", then use that to find the last row within

11条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 01:27

    Dim rng As Range
    Dim FirstRow, LastRow As long
    
    Set rng = Selection
    
    With rng
    
     FirstRow = ActiveCell.Row
    
     LastRow = .Rows(.Rows.Count).Row
    
    End With
    
    

提交回复
热议问题