title: Excel VBA Select Last Row With Ctrl End in a worksheet
body: <p>How do I adjust the below code to work with the equivalent of crtl shift end in VBA (which I think is xlLastCell or xlCellTypeLastCell)?   </p>
  
  <p>My sheet has 64 columns I only want to select Column 1 to 58 where I have data starting on row 2.   The below works unless the sheet is blank and then all rows from row 2 to 1048575 are selected.   Because I have protected cells below row 200,000 my script errors with the below.</p>
  
  <pre><code>With Worksheet(WorkSheet)
  .Range(.Cells(2,1).End(XlDown),.Cells(2,58)).Select
  End With
  Selection.ClearContents
  </code></pre>