MTD / YTD
Luke M wrote:
Lets say you have a list of dates in column A, values in column B
YTD:
=SUMIF(A:A,"<="&TODAY(),B:B)
MTD:
=SUMPRODUCT(--(MONTH(A2:A100)=MONTH(TODAY())),--(A2:A100<=TODAY()),B2:B100)
note that SUMPRODUCT can't reference entire columns (A:A:) unless using XL
2007.
Your formulas assume that there is only data for this year in the list.
|