View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default How do I sum a column with only a certain date range?

Maybe

=SUMPRODUCT(--(YEAR(A1:A10)=2007),--(MONTH(A1:A10)=1),B1:B10)

Mike

"soconfused" wrote:

92203 1 400 330.9 313.0 107.9 Jan-07 376.0
92221 1 192 191.3 186.2 11.3 Jan-07 111.0
92214 1 917 918.6 941.8 4.5 Feb-07 313.0
92217 1 210 214.0 263.4 12.0 Feb-07 107.0
92218 1 210 211.0 207.8 0.0 Feb-07 107.0
92232 1 372 371.0 359.7 5.2 Feb-07 75.0
92254 1 45 44.7 50.2 0.0 Feb-07 13.0
92264 1 85 85.8 82.6 0.0 Feb-07 15.0
92181 1 300 305.0 335.9 28.0 Mar-07 0.0
92184 1 300 305.0 335.9 28.0 Mar-07 0.0
92187 1 300 305.0 335.9 28.0 Mar-07 0.0
92190 1 300 305.0 335.9 28.0 Mar-07 0.0
92193 1 300 305.0 335.9 28.0 Mar-07 0.0
92244 1 175 150.5 156.9 4.2 Mar-07 62.0
92224 2 42 38.0 31.0 5.5 Mar-07 0.0
92225 3 63 57.0 42.5 0.0 Mar-07 0.0
92230 2 767 655.9 743.9 98.5 Mar-07 300.0
92265 1 0 0.0 0.0 0.0 Mar-07 0.0
92174 1 779 565.2 610.5 89.7 Apr-07 919.0
92175 2 738 1086.7 1097.4 318.4 Apr-07 540.0
92182 1 60 61.0 44.8 19.5 Apr-07 0.0
92185 1 60 61.0 44.8 0.0 Apr-07 0.0
92188 1 60 61.0 28.0 0.0 Apr-07 0.0
92194 1 60 61.0 40.0 0.0 Apr-07 0.0
92226 4 84 76.0 43.0 0.0 Apr-07 0.0
92227 2 42 38.0 24.0 0.0 Apr-07 0.0
92231 1 360 328.6 315.6 128.9 Apr-07 542.0
92234 1 460 454.8 533.4 30.7 Apr-07 183.0

The abve is a copy of the data that I am using. I already have the dates in
a certain column and I am trying to avoid putting information in another
column that has to be changed on a regular basis. I apologize, I did the
formula wrong the first time, it did you as you said it would, but I would
rather have a formula where I can use the data already stored in he worksheet.

Thanks again.

--
DMM


"Mike H" wrote:

I did, thanks Stephen

"Stephen" wrote:

I think Mike meant:
=SUMPRODUCT(--(YEAR(G1:G10)=YEAR(C1)),--(MONTH(G1:G10)=MONTH(C1)),B1:B10)

"soconfused" wrote in message
...
Mike,

I already have the date in column G which is Ja-07 and the number is
column
B which is 1. I guess don't undertand your answer. Can you explain
further??
--
DMM


"Mike H" wrote:

Maybe this:-

=SUMPRODUCT(--(YEAR(A1:A10)=YEAR(C1)),--(MONTH(A1:A10)=MONTH(C1)),B1:B10)

With a date in C1 which contains the month and year to sum.

Mike

"soconfused" wrote:

I am trying to sum a column with only certain dates, mean if the date
in
column G is Jan-07, I want to sum column B.

....A..........B................C...............D. .............E...............F.............G...... ..........H...
92203 1 400 330.9 313.0 107.9 Jan-07 376.0
92221 1 192 191.3 186.2 11.3 Jan-07 111.0

Thanks in advance for any information that could help me.