Sum the data for specified months

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.
 
G

Guest

Hi,

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

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

Mike
 
G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top