Thread: Sum by date
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Sum by date

I notice, however, that the formula you quoted wasn't "using an entire
year", but was going back to the first of the month, so from 17 March 2008
would go to 1 March 2007.
My formula does the same for 6 months so would go to 1 September 2007.
If you actually want to go back 6 months from today (to 17 September 2007),
then change the formula to
=SUMIF(A1:A100,"=" &
DATE(YEAR(TODAY()),MONTH(TODAY())-6,DAY(TODAY())),B1:B100)
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
Have you tried
=SUMIF(A1:A100,"=" & DATE(YEAR(TODAY()),MONTH(TODAY())-6,1),B1:B100) ?
--
David Biddulph

"hmsawyer" wrote in message
...
I found this one in an old post and it is almost what I need:

=SUMIF(A1:A100,"=" & DATE(YEAR(TODAY())-1,MONTH(TODAY()),1),B1:B100)

However, I need to use a rolling 6 months and this formula is using an
entire year. How would I change it? Thanks!

"hmsawyer" wrote:

In column B, I am trying to add up the values in columns E, H, K, etc
(every
third column), but ONLY if the corresponding date in columns C (for E),
F
(for H), I (for K), etc (every third column) is within 6 months from
TODAY.
I can move the data around if the values need to be next to the
corresponding
dates, but that will move around some list validations I already have
set up,
so I'm trying to avoid it if possible.

I think it is a sum if, but I can't get it to work. Any help is
appreciated. Thank you so much!