View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tyro[_2_] Tyro[_2_] is offline
external usenet poster
 
Posts: 1,091
Default Trailing 3 month sales

Take a look at this site:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

BTW, SUMPRODUCT can do more than multiply. It can also do other things like
division, addition, subtraction and exponentiation. For example A1 = 1, A2 =
2, A3 = 3, B1 = 2, B2 = 2, B3 =2.

=SUMPRODUCT(A1:A3/B1:B3) = 3
=SUMPRODUCT(A1:A3+B1:B3) = 12
=SUMPRODUCT(A1:A3-B1:B3) = 0
=SUMPRODUCT(A1:A3^B1:B3) = 14

Tyro


"Aaron" wrote in message
...
Very simple example of Data I'm working with:

Month Store Sales
1/31/2007 west 400
2/28/2007 west 100
3/31/2007 west 300
4/30/2007 west 500
5/31/2007 west 400
6/30/2007 west 100
7/31/2007 west 300
1/31/2007 east 400
2/28/2007 east 100
3/31/2007 east 300
4/30/2007 east 500
5/31/2007 east 400
6/30/2007 east 100
7/31/2007 east 300

In my formula, I will know the store and I will know the Date. Say east
and
5/31/2007. In that case I will want to sum the sales for east for may,
april, and march. (thus the trailing three month sales for east as of may)

In reality I have more criteria columns and need to do trailing 12 months
or
more, but a solution to the simple example above will show me the way. I
have built mega Sumproduct formulas where I use date functions to count
back
months and add all the results, but the formula's are so long they
sometimes
don't fit in a cell.

Any ideas? If it helps I can nest an offset into the formula that
contains
the values of may april and march from a seperate table of dates, but I
havn't figured out how to use that to my advantage or if that is even the
right approach.