I am trying to sum the values of all values being run through the for loop. E.g, Column A has 5 values, A1=1 , A2=2 , A3=3, A4=4 , A5=5. I am trying to sum up all the values when the loop runs . I need it to calculate my project profit and loss , the example illustrated is just a simple one of course for the sake of my understanding
This is my code that I am stuck at.I know its simple and I am missing something here.
Sub test()
Dim a As Long
Dim i As Long
a = 0
For i = 1 To 5
a = Range("A" & i).Value
Next i
End Sub
Bookmarks