title: How can I reformat a two-dimensional array in VBA to have two "0" values between each item?
body: <p>I'll preface this by saying I'm very new to VBA, effectively restarted today after not having used it since economics at uni.</p>
  
  <p>I have created a two-dimensional array <code>Answers()</code> that contains the answers from a number of respondents (<code>Resp</code>) to a number of questions (<code>Ques</code>).</p>
  
  <p>Here's an example of the first line in the array:</p>
  
  <pre><code>[3,3,3,2,1,2,2,3,1,3,1,2]
  </code></pre>
  
  <p>I need to format this into a new array with two <code>0</code> values between each value in the original array, and at the end, so that the first line ends up like this:</p>
  
  <pre><code>[3,0,0,3,0,0,3,0,0,2,0,0,1,0,0,2,0,0,2,0,0,3,0,0,1,0,0,3,0,0,1,0,0,2,0,0]
  </code></pre>
  
  <p>I have searched around for similar examples and found something close, but I can't figure out how to make it read the correct value from the original array in each step of the for loop:</p>
  
  <pre><code>Dim Resp As Integer
  Dim Ques As Integer
  Resp = 200
  Ques = 12
  
  Dim Answers() As Integer
  ReDim Answers(1 to Resp, 1 to Ques) As Integer
  
  Dim lastIndex As Integer
  lastIndex = Ques * 3
  
  Dim Answers_Long() As Integer
  ReDim Answers_Long(1 To Resp, 1 To lastIndex) As Integer
  
  For r = 1 To Resp
      For i = 1 To lastIndex Step 3
          Answers_Long(r, i) = Answers(r, CInt(i / 3))
          Answers_Long(r, i + 1) = 0
          Answers_Long(r, i + 2) = 0
      Next i
  Next r
  </code></pre>
  
  <p>If you have any tips for how I can change the line:</p>
  
  <pre><code>Answers_Long(r, i) = Answers(r, CInt(i / 3))
  </code></pre>
  
  <p>to correctly read the data from <code>Answers()</code> it would be much appreciated.</p>