Hi,
I'm trying to get my head around Arrays. What I want to do is sum three values in an array and then split them out into the cell c1. I want it then to move down and then sum the next three cells and keep repeating until there are no more cells to sum. I have come up with the following code however I keep getting a runtime error.
Dim Store As Single
Dim RangeCells(1 To 3) As Single
Range("c1").Select
For i = 1 To 3
Selection.Offset(i, -1).Value = Store
Next
Application.Sum.RangeCells(Store) = ActiveCell
Any help would be much appriciated
I'm trying to get my head around Arrays. What I want to do is sum three values in an array and then split them out into the cell c1. I want it then to move down and then sum the next three cells and keep repeating until there are no more cells to sum. I have come up with the following code however I keep getting a runtime error.
Dim Store As Single
Dim RangeCells(1 To 3) As Single
Range("c1").Select
For i = 1 To 3
Selection.Offset(i, -1).Value = Store
Next
Application.Sum.RangeCells(Store) = ActiveCell
Any help would be much appriciated