title: Simple sort of each column in an array
body: <p>I use VBA occasionally and I'm getting trapped in the syntax around ranges. I want to take an array as selected on the active sheet and sort each column one at a time returning an array of ordered columns. It seems simple with a <code>for</code> loop, however, I keep getting errors which I think relate to the scope.</p>
  <pre><code>Public Sub Sortrange() 'sorts each column in a range individually low to high
      Dim Rng, Sortcol As Range
    
          HH = Selection.Rows.Count
          Set Rng = Selection
          Srow = Rng(1).Row
          SCol = Rng(1).Column
          With Rng
            For i = 1 To .Columns.Count
              A = Srow
              B = SCol + i - 1
              Sortcol = Range(Cells(A, B), Cells(HH, B))
              Sortcol.Sort key1:=Range(Cells(A, B))
           Next
          End With
  End Sub
  </code></pre>