View Single Post
  #3   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

It's nothing wrong with the formula per se although it is probably better to
use

=SUMPRODUCT(--($A$27:$A$38=P27),$L$27:$L$38)

which you can enter normally, regardless it must be something wrong with
your criteria
your table makes no sense. what is in A27:A38?

--
Regards,

Peo Sjoblom

(No private emails please)


"Tat" wrote in message
...
I would like the sumif statment to add the values in cells that are
generated
by the sum formula.
I am using the following conditional if statement:
=SUM(IF($A$27:$A$38=P27,$L$27:$L$38,0)

Cells in column L add up other cells in column K to come up with a value.
However, the sumif statement does not give me the correct answer. It gives
me
the total of that column instead of adding the corresponding values in the
cell that match cell P27.

P L Value of cell L column A28
is
2003
2003 =sum(k1:k5) 50
2003 =sum(k8:k17) 80
2004 =sum(k18:k22) 20

Instead of giving me an answer of 130 I get 150.