View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default SUMPRODUCT problems...argh...

I would have thought you wanted either
=SUMPRODUCT(--(DropCode_Log!$B$10:$B$400=Totals!$A$17),--(DropCode_Log!$C$10:$C$400=Totals!$A19),--(DropCode_Log!$D$10:$D$400=Totals!B$18),--(DropCode_Log!$G$10:$G$400="SIK"))
or
=SUMPRODUCT((DropCode_Log!$B$10:$B$400=Totals!$A$1 7)*(DropCode_Log!$C$10:$C$400=Totals!$A19)*(DropCo de_Log!$D$10:$D$400=Totals!B$18)*(DropCode_Log!$G$ 10:$G$400="SIK"))

You've separated the last 2 terms with --. You should separate either with
* or with ,--

You didn't need the double unary minus in front of the first term when you
used the * operator to combine it with the second term.
Double unary minus is there to force an arithmetic operation to convert from
Boolean to a number, but as you've got an arithmetic operation anyway you
don't need double unary minus as well.

You can get away with mixing and matching commas and multiplications, but
you need one or the other, and your
*(DropCode_Log!$D$10:$D$400=Totals!B$18)--(DropCode_Log!$G$10:$G$400="SIK")
is unlikely to be what you want.
It would behave as
*(DropCode_Log!$D$10:$D$400=Totals!B$18)+(DropCode _Log!$G$10:$G$400="SIK")
--
David Biddulph


"Cita" wrote in message
...
Hello, once again, I have to read 4 columns of info and count the records.
Here's the formula:

=SUMPRODUCT(--(DropCode_Log!$B$10:$B$400=Totals!$A$17)*(DropCode _Log!$C$10:$C$400=Totals!$A19)*(DropCode_Log!$D$10 :$D$400=Totals!B$18)--(DropCode_Log!$G$10:$G$400="SIK"))

Where Column B are dates, Column C are categories, Column D is a 2nd
category, and Column G are codes...

What am I doing wrong?

Thanks in advance...