I would recommend you use subtotals instead of individually placing formulas. And a conditional format can be used to give the colors. Check the attachment.
So I've selected the table from Column B to H starting from the first row after the headers. And used the formula RIGHT($B4,5) = "Total", and gave the required conditional format I needed. And then just used a very simple line of code
Code:
Sub SubTotalize()
Range("B3:H" & Cells(Rows.Count, 2).End(xlUp).Row).Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2, 3, 6), Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End Sub
This will easily club your daily totals and sum it up using subtotals.
Bookmarks