Hi Tibardoni
You might like to try this macro code. It covers the range A1:G50 , (change as required).
When it finds a yellow cell it sums all cells above it up to the first empty cell
Dim x As Range
For Each cell In Range("A1:G50")
If cell.Interior.ColorIndex = 6 Then
cell.Value = "=sum(" & cell.Offset(-1, 0).Address & ":" & cell.Offset(-1, 0).End(xlUp).Address & ")"
End If
Next
End Sub
Hope this gives you some ideas
regards
Derek