I want to set every eighth cell on one worksheet to the value of a cell in another worksheet. I wrote this here:
Sub xx()
For i = 5 To 45 Step 8
The issue seemed to be that you had an end if
without a corresponding If
to start, and to assign a value for the range in sheet 5 you don't need to state set
you can just assign the values directly like so:
Sub xx()
For i = 5 To 45 Step 8
ActiveWorkbook.Sheets("Sheet5").Cells(i, 3).Value = ActiveWorkbook.Sheets("Sheet7").Cells(13, 31).Value
Next i
End Sub