I've got a spreadsheet like this:
date | 7/1 | 7/2 | 7/3 | 7/4
-----|-----|-----|-----|-----
val | 3 | 5 | 1 | 3
-----|-----|-----|-----|-----
I want to sum the val row, but only up to the current date. So if today were 7/3, the sum would be 3+5+1=9. If today were 7/4, it would be 12.
I figured this out to get the number of columns:
=YEARFRAC(B1,TODAY())*360 // B1 is the first date -- 7/1
but I can't figure out how to tell excel to do the sum:
=SUM(B2:<B+num cols above>2)
Presumably its something to do with references, and lookup, but I'm not really familiar with how those work....