View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 299
Default Total last 30 days

=SUMPRODUCT(--(A2:A1000=TODAY()-30),--(A2:A1000<=TODAY()),B2:B1000)

adapt to fit for the rest of the dates


Note that you cannot use the whole column A:A unless you use Excel 2007
--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)


"Eric" wrote in message
...
I have dates in column A
Numbers in column B

I want to find the sum of numbers on column B that correspond to the last
30
days (including today), 90 days, 6 months, 1 year.

I used
=SUMIF(A:A,(TODAY()-30),B:B)+SUMIF(A:A,(TODAY()-29),B:B)+SUMIF(A:A,(TODAY()-28),B:B)...
etc. until I got 30 days.

Q? Is there an easier formula/method?