title: Excel VBA set multiple cells to the same value
body: <p>I want to set every eighth cell on one worksheet to the value of a cell in another worksheet. I wrote this here:</p>
  
  <pre><code>Sub xx()
      For i = 5 To 45 Step 8
          Set ThisWorkbook.Sheets("Sheet5").Cells(i, 3).Value = ThisWorkbook.Sheets("Sheet7").Cells(13, 31).Value
      Next i
  End Sub
  </code></pre>
  
  <p>If I try to run it, it gives me a subscript out of range error.
  <em>Sheet5</em> has also been named <em>Binomial Sheet</em>, do I have to reference this differently?
  Are there other ways to accomplish this?</p>