How to select a range of the second row to the last row

前端 未结 2 1833
误落风尘
误落风尘 2021-02-04 16:10

I am currently trying to figure out how to select a range from the second row to the last row, but more specifically between a range of columns. For instance I want to select Ra

2条回答
  •  梦如初夏
    2021-02-04 17:02

    Try this:

    Dim Lastrow As Integer
    Lastrow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
    
    Range("A2:L" & Lastrow).Select
    

    Let's pretend that the value of Lastrow is 50. When you use the following:

    Range("A2:L2" & Lastrow).Select
    

    Then it is selecting a range from A2 to L250.

提交回复
热议问题