Sum the data for specified months

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to know if there is a function which can add the amount for last 12
month form the given month. My worksheet contains 2 column i.e. Date
dd/mm/yyy and Amoutn.
 
Hi,

Data in columns A & B and the monthe to sum ( 1- 12) in c1

=SUMPRODUCT((MONTH(A1:A100)=C1)*(B1:B100))

Mike
 
try for 12 months from this month (month of TODAY()):

=SUMPRODUCT(--(TEXT(A1:A20,"yyyymm")>=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY())-12,DAY(TODAY())),"yyyymm")),B1:B20)
 
Back
Top