title: Looping macro to work on all columns individually without writing long list of repeated transitions
body: <p>I am trying to loop this macro (below) to go through all me data columns but need some help creating a loop or adjusting the current code to work for all columns.</p>
  
  <pre><code>Sub Trial_5()
  
  '
      ActiveCell.Offset(0, -7).Columns("A:A").EntireColumn.Select
      ActiveWorkbook.Worksheets("Sheet6").Sort.SortFields.Clear
      ActiveWorkbook.Worksheets("Sheet6").Sort.SortFields.Add Key:=ActiveCell, _
          SortOn:=xlSortOnValues, Order:=xlDescending,    DataOption:=xlSortNormal
      With ActiveWorkbook.Worksheets("Sheet6").Sort
          .SetRange ActiveCell.Range("A1:A16395")
          .Header = xlGuess
          .MatchCase = False
          .Orientation = xlTopToBottom
          `enter code here`.SortMethod = xlPinYin
         .Apply
      End With
  End Sub
  </code></pre>
  
  <p>do I adjust the .columns or the activecell.offset to total range??</p>
  
  <p>adjusted script</p>
  
  <pre><code>Sub eachcolumndesending()
  '
  ' eachcolumndesending Macro
  ' descending
  '
  
  '
      Columns("A:A").Select
      ActiveWorkbook.Worksheets("Sheet5").Sort.SortFields.Clear
      ActiveWorkbook.Worksheets("Sheet5").Sort.SortFields.Add Key:=Range("A1"), _
          SortOn:=xlSortOnValues, Order:=xlDescending,    DataOption:=xlSortNormal
      With ActiveWorkbook.Worksheets("Sheet5").Sort
          .SetRange Range("A2:A32")
          .Header = xlNo
          .MatchCase = False
          .Orientation = xlTopToBottom
          .SortMethod = xlPinYin
          .Apply
      End With
      Columns("B:B").Select
      ActiveWorkbook.Worksheets("Sheet5").Sort.SortFields.Clear
      ActiveWorkbook.Worksheets("Sheet5").Sort.SortFields.Add Key:=Range("B1"), _
          SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
      With ActiveWorkbook.Worksheets("Sheet5").Sort
          .SetRange Range("B1:B33")
          .Header = xlNo
          .MatchCase = False
          .Orientation = xlTopToBottom
          .SortMethod = xlPinYin
          .Apply
      End With
  </code></pre>