Thread: sumif
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 sumif

You need to be very careful if the size of the array you are testing is
different from the size of the array you are counting. You started one
array at C5 and the other at C2. Look at the Excel help for SUMIF to see
how this would be treated.
If the two arrays are the same, you can omit the second occurrence from the
formula.
I'm surprised that you are getting an answer which adds all the amounts and
ignores the =A20 criterion, as I would expect the syntax of your formula to
be looking for the text string "=a20" and thus return a zero.

Perhaps try:
=SUMIF(C5:C25, "="&A20)
--
David Biddulph

"tsony" wrote in message
...
Hi

I have a row c2: c25 which contains date row c5:c25 contains amounts. I
need
to add the amounts when I select a date from the section box at a20(the
date
is selected from the c2:c25 date validation list). The result will be on
the
row c27. I tried the formula =sumif(c5:c25, "=a20", c2:c25) but it adds
all
the amounts ignoring the critera =a20. Is there any easy way to do this?
Some times it shows zero.
--
tsony