i want to find the sum for sections within a column, the start and finish of these sections is variable.

At the moment i have it calculating the sum for the first of these sections, the start of which i know, but after this point it doesn't have the start of the next sections and keeps returning the value for the first section.

This is what i have:

Sub colour()

Do Until IsEmpty(ActiveCell) And ActiveCell.Interior.ColorIndex <> 40

If ActiveCell.Interior.ColorIndex = 40 Then

ActiveCell.Offset(1, 0).Select

End If

Do Until ActiveCell.Interior.ColorIndex = 40

Application.WorksheetFunction.Sum(range("c13", range("c13").End(xlDown)))

ActiveCell.Offset(1, 0).Select

Loop

MsgBox "...and the sum is " & summy

Loop

End Sub