View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Criteria For SU<IF

I don't know really, the formula works fine, I just re-tested it.

You can't use whole columns in SUMPRODUCT, unless you have Excel 2007, it
must be an explicit range.

--
__________________________________
HTH

Bob

"Minitman" wrote in message
...
Hey Bob,

Thanks for the reply.

I copied and pasted your code:

=SUMPRODUCT(--(YEAR(A1:A100)=YEAR(A10)),--(MONTH(A1:A100)=MONTH(A10)),E1:E100)

And ran a test.

It returned the #VALUE! error.

I tried to modify it like so:

=SUMPRODUCT(--(YEAR(A:A)=YEAR(A10)),--(MONTH(A:A)=MONTH(A10)),E:E)

And it returned the #NUM! error.

That column is formatted as currency, but that shouldn't make any
difference, should it?

What did I do wrong?

-Minitman



On Mon, 1 Dec 2008 21:29:20 -0000, "Bob Phillips"
wrote:

=SUMPRODUCT(--(YEAR(A1:A100)=YEAR(A10)),--(MONTH(A1:A100)=MONTH(A10)),E1:E100)
__________________________________
HTH

Bob

"Minitman" wrote in message
. ..
Greetings,

I am trying to get the sum of a column of numbers (column E) if the
date in column A is within the same month and year of the date in the
row this formula is sitting in. This sheet covers several years.

What I have so far is this formula sitting in E10 (the cell where I
want the sum to be):

=SUMIF($A:$A,$A10,E:E)

Row 10 is used only as a monthly divider and monthly subtotals (For
this example). Column A is formatted as date in the "mm dd, yy"
format.

With values in column E that should return a sum total, I am instead
getting "$0.00". My criteria ($A10) is not working.

How can I change the criteria to look at only for the "mm, yy" of
column A's "mm dd, yy" entries and not the full "mm dd, yy" date?

Any help will be greatly appreciated.

-Minitman