title: Excel vba loop through range alphabetically
body: <p>I want to loop through a range of cells alphabetically to create a report in alphabetical order. I dont want to sort the sheet as the original order is important.</p>
  
  <pre><code>Sub AlphaLoop()
  
  'This is showing N and Z in uppercase, why?
  For Each FirstLetter In Array(a, b, c, d, e, f, g, h, i, j, k, l, m, N, o, p, q, r, s, t, u, v, w, x, y, Z)
      For Each SecondLetter In Array(a, b, c, d, e, f, g, h, i, j, k, l, m, N, o, p, q, r, s, t, u, v, w, x, y, Z)
          For Each tCell In Range("I5:I" &amp; Range("I20000").End(xlUp).Row)
              If Left(tCell, 2) = FirstLetter &amp; SecondLetter Then
                  'Do the report items here
          End If
          Next
      Next
  Next
  
  End Sub
  </code></pre>
  
  <p>Note that this code is untested, only sorts by the first 2 letters and is time consuming as it has to loop through the text 676 times. Is there a better way than this?</p>