Excel Formulas for Report Totals

If the report: