Okay so basically I want to print each individual iteration of this loop (I will be adding in way more for loops when I get this working) to print the value of a certain cell as well as the values of my variables which are changing for each iteration. I therefore need to set up a counter which I can use as the row for each iteration and I am having an issue with it as it is going infinite. I don't have any experience with VBA but this would work in other languages I briefly used at uni unless I am mistaken. So basically the output of this is value a 1, value b is 1 and the value being printed into to column 52 is in tern the same and this is printing infinitely downwards from row 75 (which is where count starts). I am hoping my mistake is obvious, thanks for helping!
Option Explicit
Sub errorloop()
Dim a As Long
Dim b As Long
Dim count As Integer
count = 75
For a = 1 To 3 Step 0.5
Cells(75, 48) = a
For b = 1 To 3 Step 0.5
Cells(76, 48).Value = b
Cells(count, 50) = a
Cells(count, 51) = b
Cells(count, 52) = Cells(113, 36).Value
count = count + 1
Next b
Next a
End Sub
Bookmarks