I want to create a summary table in a new sheet, and at the moment I'm just doing it very crudely. I will try a more elegant solution in the future.
Anyway, this is the code I have so far:
Sub createsummarytable()
Worksheets.Add().Name = "datasummary"
With Worksheets("datasummary")
Dim i As Long
Dim Startpoint As Long
Startpoint = -5
For i = 1 To 40
.Cells(Startpoint + (5 * i), 1).Value = "Block" & "i"
Next i
End With
End Sub
I am getting the error in the title on line: .Cells(Startpoint + (5 * i), 1).Value = "Block" & "i"
If anyone wants to make the code more elegant in addition to solving the error, that would be appreciated.