View Single Post
  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default sumif with or< condition

You can only have one condition with SUMIF. Try this:

=SUMIF(A1:A6,""&20000,A1:A6)+SUMIF(A1:A6,"<"&-20000,A1:A6)

Hope this helps.

Pete

On Apr 27, 1:39 am, "Will Fleenor" wrote:
I have 6 numbers in cells a1..a6. Some are positive and some are negative.
I would like to total up only the numbers that are 20000 or <-20000.
This formula works for
=SUMIF(A1:A6,""&20000,A1:A6)
but this formula will not work:
=SUMIF(A1:A6,or(""&20000,A1:A6,"<"&-20000),A1:A6 )
What is wrong with the last formula. It always evaluates to 0.

Thanks Will