Hi,
I'm trying to write a formula which will allow me to track a Year-to-Date value based on a budget. As in this example:
Sum Index Match Array.PNG
Based on this, i want to be able to calculate the year-to-date value assuming we are in September (C21) for Cost1 & Cost2. i.e. the value i want is -342 (sum(B5:J6)). But if i change the month in C21 to October the new value would be -390 (sum(B5:K6)).
I have tried a couple of combinations that don't quite get what i'm after:
=SUM(HLOOKUP(C21,$A$1:$M$8,{5,6},0))
or
=SUM(INDEX($A$1:$M$8,{5,6},MATCH(C21,A1:M1,0),1))
The first effort gives me the right number for the current month (sum(J5:J6)) and the second only gives (J5). But i can't expand this to the full y-t-d.
Has anyone got a idea on this? Ideally without using helper columns if possible.
Thanks
Bob.
Bookmarks