title: How to sort cells in a column from A to Z?
body: <p>The code is from slightly edited macro. I tried to remove the 'messy code', however it is not working. The aim of it is to sort data in column BF from A to Z.</p>
  
  <pre><code> Dim InSheet As Worksheet
      Set InSheet = ThisWorkbook.Worksheets("A to Z")
   Dim LastRow as Integer
     LastRow = InSheet.Cells(Rows.Count, 58).End(xlUp).Row
  
   InSheet.Select
       Columns("BF:BF").Select
   InSheet.Sort.SortFields.Clear
   InSheet.Sort.SortFields.Add Key:=Range( _
      "BF1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
      xlSortNormal
    With InSheet.Sort
      .SetRange Range("A1:BF" &amp; LastRow)
      .Header = xlGuess
      .MatchCase = False
      .Orientation = xlTopToBottom
      .SortMethod = xlPinYin
      .Apply
  End With
  </code></pre>
  
  <p>SO I tried this and it is not working:</p>
  
  <pre><code> Dim InSheet As Worksheet
      Set InSheet = ThisWorkbook.Worksheets("A to Z")
   Dim LastRow as Integer
     LastRow = InSheet.Cells(Rows.Count, 58).End(xlUp).Row
  
   InSheet.Columns("BF:BF")
   InSheet.Sort.SortFields.Clear
   InSheet.Sort.SortFields.Add Key:=Range( _
      "BF1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
      xlSortNormal
    With InSheet.Sort
      .SetRange Range("A1:BF" &amp; LastRow)
      .Header = xlGuess
      .MatchCase = False
      .Orientation = xlTopToBottom
      .SortMethod = xlPinYin
      .Apply
  End With
  </code></pre>
  
  <p>Any ideas? I would like to really avoid <code>.select</code> an other stuff as it is hugely decreasing performance.</p>