Hi

So I have a sheet that has dates, each date has a few entries and they total for each date and there is a grand total at the bottom that adds the totals for each date. Shown below.

A1 Day 1
A2 Entry 1 20
A3 Entry 2 30
A4 Entry 3 40
A5 Total for day 90

A6 Day 2
A7 Entry 1 10
A8 Entry 2 30
A9 Entry 3 10
A10 Total for day 50
...

>Grand Total for Period = Sum(B5 + B10)

Now I have a VBA code that will add a blank date and entires below the last date but above the Grand Total. My question is I want a code to modify the Grand Total formula to include the new date's total so the formula Sum(b5 + b10) would be Sum(b5 + b10 + b15).

I was thinking of an if statement that finds all of the rows of Total for the Day and puts them into the formula?

Can Anyone help me with this? Thank you!