title: Selecting first and last row at the same time in VBA
body: <p>I'm trying to make a macro to select the first and the last row in my data range but I don't know how to make it so that the selection for both rows stay. This is what I tried to do:</p>
  
  <pre><code>Sub Macro6()
  '
  ' Macro6 Macro
  
      ActiveWindow.SmallScroll Down:=15
      Dim lr As Long
      lr = Cells(Rows.Count, 1).End(xlUp).Row
      Rows(lr).Select
      Rows(1).Select
  
  
  End Sub
  </code></pre>
  
  <p>I dont't really need a 'first row' code since my data always starts in Row 1. I should probably mention that I have never learned VBA before, but I'm kinda forced to learn it for work XD (got the above code by Googling). Just wondering if there is a method that will make both selections be highlighted at the same time. Thanks a lot!</p>