A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Use a dynamic sum that points to the spilled range starting at C19.
In E9, enter:
=SUM(C19#)
This sums the entire spilled array that starts in C19, so when the parent-sheet formula adds or removes rows, the total updates automatically.
If the values in column C are generated by a dynamic array formula, this is the correct approach because Excel automatically resizes the C19# spill range.
If needed, a standard fixed-range version is:
=SUM(C19:C307)
But that does not adjust automatically when the number of returned rows changes.
If the requirement is to total only values that meet conditions, Excel also supports SUMIF for one condition and SUMIFS for multiple conditions.