humpaco,
Welcome to the forum!
Attached is a modified version of your provided workbook.
It contains two different solutions. The first uses a sumproduct formula. The second is a slightly shorter array formula.
I also rearranged the output table slightly.
In Cell N1 you enter the end date
In column M starting in M3 and down you enter the Unit
In column N starting in N3 and down you enter the Region
In cell O3 (YTD total using sumproduct) and copied down is this regular formula:
In cell P3 (YTD total using array formula) and copied down is this array* formula:
*Note that array formulas must be entered with Ctrl+Shift+Enter and not just Enter. That's how it gets surrounded by the curly braces {}, do not try to add those manually.
You can use whichever solution you feel more comfortable with. Is that what you were looking for?
Bookmarks