=SUMIF(A1:A100, ">=" & DATE(YEAR(TODAY()), MONTH(TODAY()) - $C$1, 1),
B1:B100)
Inputting 6, 12 or 18 into C1 changes the calculation to a rolling 6, 12 or
18 month.
You only need to adjust months. The Date function handle any crossover
between years for you.
HTH,
--
George Nicholson
Remove 'Junk' from return address.
"JJC" <JJC@discussions.microsoft.com> wrote in message
news:9E8F9BE1-B3C9-46F6-B47C-A592501A9E79@microsoft.com...
> In the following table in Excel; Colum A is the MMMM-YY format for dates
> and
> column B is my data. How do I get a rolling 6 month total, rolling 12
> month,
> and rolling 18 month total?
>
> January-02 2
> February-03 15
> March-03 0
> April-03 0
> May-03 0
> June-03 5
> July-03 6
> August-03 4
> September-03 0
> October-03 0
> November-03 2
> December-03 0
> January-04 0
> February-04 0
> March-04 0
> April-04 4
> May-04 5
> June-04 2
> July-04 0
> August-04 20
> September-04 10
> October-04 3
> November-04 5
> December-04 0
> January-05 0
> February-05 0
> March-05 0
> April-05 10
> May-05 0
> June-05 0
>
> I have used the following in the cell to come up with a yearly total
>
> =SUMIF(A1:A100,">=" &DATE(YEAR(TODAY())-1,MONTH(TODAY()),1),B1:B100)
>
> but am trying to get a 6 month and 18 month total. Also I am looking for
> data between Jan 04 and Dec 04 only.
>
> Any help would be appreciated.
>
>
Bookmarks