View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
soconfused soconfused is offline
external usenet poster
 
Posts: 93
Default How do I sum a column with only a certain date range?

Okay, I have tried that and I am coming up with 0 for an answer which is
incorrect.
--
DMM


"Mike H" wrote:

Hi,

You have 2 choices, embed the date in the formula or as in the offered
solutions put the date to sume in another cell which in this case is C1. Best
practice (some may argue otherwise) is to put the date in a cell because this
saves editing formula and lessens the risk of error. So the solution to your
summing problem is

=SUMPRODUCT(--(YEAR(G1:G10)=YEAR(C1)),--(MONTH(G1:G10)=MONTH(C1)),B1:B10)

Wher C1 contains a date (say) 1/1/2007. The formula will then sum everything
for January 2007. C1 can be any cell on your sheet.

Mike

"soconfused" wrote:

Let me apologize for I am extremely confused. I only have two columns that
I'd like to work ith G has the month and year, B has the number that I'd like
to sum. Column C doesn't have anything to do with equation I'm looking for.

I hope that I'm just misunderstanding.

Thanks again.
--
DMM


"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.