Sum for last calendar month & year
Try something like this:
With
Dates in A1:A40
Values in B1:B40
The total for the month prior to today's month:
C1: =SUMPRODUCT(--(TEXT(A1:A40,"yyyymm")=TEXT(TODAY()-DAY(TODAY()),"yyyymm")))
The total for the year prior to today's year:
C2: =SUMPRODUCT(--(YEAR(A1:A40)=(YEAR(TODAY())-1)))
Does that help?
***********
Regards,
Ron
XL2002, WinXP
" wrote:
I have a spreadsheet with column H = date and column J is a numerical
value. I am looking for a way to sum all entries in the last calendar
month and also for the last calendar year (Jan1 -Dec 31).
Can anyone help me with this?
Jim
|