Sum variable range of cells using "today's" date as starting point.

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2010-06-06T05:19:42Z Indexed on 2010/06/06 5:22 UTC
Read the original article Hit count: 125

Filed under:

How do you sum a variable range of cells based upon today's date in MS Excel 2003.

Spreadsheet format:

Variable range = # of days to sum

Date range = listed in row 1, 1 day per cell (example A1=1/1/10, B1=1/2/10, C1=1/3/10....)

Numbers to be summed - listed in row 2, X number per cell (example A2=8, B2=6, C2=1.....)

example problem: IF variable range = 2 & Current Date = 1/2/10 then...Sum(b2:c2)=7

I am able to sum the entire row based upon current date using the following formula but am not able to add the variable range to the sum function. =SUMIF(A1:C1,">="&TODAY(),A2:C2)

© Stack Overflow or respective owner

Related posts about excel