title: How do I code Shift + Left Arrow key in VBA Excel to change my range?
body: <p>I'm new with VBA and wanted to create a VBA program to automatically block one column to the left from the right side, here's a picture for example: <a href="https://i.stack.imgur.com/RdYFk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RdYFk.png" alt="enter image description here"></a></p>
  
  <p>And make it into like so: </p>
  
  <p><a href="https://i.stack.imgur.com/I6J7T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I6J7T.png" alt="enter image description here"></a></p>
  
  <p>I'm trying to use offsets to do that but I'm not sure which value I should use because value of (-1) exert to the left column and (1) did the same on the right.</p>
  
  <p>here's my code:</p>
  
  <pre><code>
  Sub Macro47()
  '
  ' Macro47 Macro
  '
  '
  Range("B2").Select
      Range(Selection, Selection.End(xlDown)).Select
      Range(Selection, Selection.End(xlToRight)).Select
      'Debug.Print ActiveCell.Address
      Range(Selection, Selection.Offset(0, -1)).Select
  
  
  End Sub
  
  </code></pre>