ytd sum by selecting month

G

Guest

I have rows of data with a date column (example: 31-May-05), starting Jan
through May. Is there a way to sum column 'A' ytd based on the month I
select? Example: February would sum Jan and Feb, or April would sum Jan,
Feb, Mar, and Apr.
Thanks,
Greg
 
G

Guest

Greg,

I'm guessing you wanted to sum a particular column of data to the right of
your dates(and not more than one column). The formula below should work but
will have to be revised if you need more than one column summed. [formula is
below table]

1 B C D
2 date amount ytd
per month amount
3 5/1/2005 25 25
4 6/1/2005 16 41
5 7/1/2005 61 102
6 8/1/2005 12 114
7 9/1/2005 54 168
8 10/1/2005 5 173
9 11/1/2005 23 196
10 12/1/2005 4 200
11 1/1/2006 15 15
12 2/1/2006 8 23
13 3/1/2006 15 38
14 4/1/2006 51 89
15 5/1/2006 9 98
16 6/1/2006 15 113
17 7/1/2006 16 129
18 8/1/2006 17 146
19 9/1/2006 18 164
20 10/1/2006 19 183
21 11/1/2006 20 203
22 12/1/2006 21 224
23 1/1/2007 22 22
24 2/1/2007 23 45
25 3/1/2007 24 69

formula in d3
=SUMPRODUCT(--(YEAR($B$3:$B$25)=YEAR(B3)),--(MONTH($B$3:$B$25)<=MONTH(B3)),--($C$3:$C$25))
 

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

Top