title: Make every set of eight rows move into columns in Excel
body: <p>I would like to make every set of eight rows move into columns in Excel for example here is a set with every four rows broken into columns:</p>
  
  <p>From this:
  <a href="https://i.stack.imgur.com/nFcOH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nFcOH.png" alt="Data in one column"></a></p>
  
  <p>To this:
  <a href="https://i.stack.imgur.com/kmjbS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kmjbS.png" alt="Data in multiple columns"></a></p>
  
  <p>I've tried this code in VBA which I've seen in a previous question found on <a href="https://superuser.com/questions/583595/move-every-7-columns-into-new-row-in-excel">https://superuser.com/questions/583595/move-every-7-columns-into-new-row-in-excel</a></p>
  
  <pre><code>    Dim i As Integer, j As Integer, cl As Range
      Dim myarray(100, 6) As Integer 'I don't know what your data is.  Mine is integer data
      'Change 100 to however many rows you have in your original data, divided by seven, round up
      'remember arrays start at zero, so 6 really is 7
  
      If MsgBox("Is your entire data selected?", vbYesNo, "Data selected?") &lt;&gt; vbYes Then
          MsgBox ("First select all your data")
      End If
  
      'Read data into array
      For Each cl In Selection.Cells
          Debug.Print cl.Value
          myarray(i, j) = cl.Value
          If j = 6 Then
              i = i + 1
              j = 0
          Else
              j = j + 1
          End If
      Next
  
      'Now paste the array for your data into a new worksheet
      Worksheets.Add
      Range(Cells(1, 1), Cells(101, 7)) = myarray
  End Sub
  
  </code></pre>
  
  <p>However, it only seems to work with integers and not data that has both numbers and letters if I am understanding correctly. </p>
  
  <p>I get an error:</p>
  
  <pre><code>Run-time error '13':
  Type mismatch
  </code></pre>