This question is kind of complicated (I feel), so I will do my best to explain the problem.
Essentially what I want to do is move down each column in the range, adding each cell value up (getting the sum of the column) and then adding it to an array. However, when testing the values held in the array, it is always 0. Is there a better way to do this?
Here is my current code:
Dim sumHoldings(1 To 36) As Double
k = 1
For Each rep In repNames
If rep <> vbNullString Then
Worksheets(rep).Activate
Dim i As Integer
Dim sumHolder As Double
For i = 3 To 6
Columns(i).Select
For Each rangeCell In Selection
If rangeCell <> vbNullString Then
sumHolder = rangeCell.Value + sumHolder
Else:
sumHoldings(k) = sumHolder 'this current method will keep overwriting itself
k = k + 1
Exit For
End If
Next rangeCell
Next i
End If
Next rep
Heres a visual representation of what I am trying to do:
Any help is greatly appreciated, thank you!