View Single Post
  #2   Report Post  
RagDyer
 
Posts: n/a
Default

Enter the particular fruit that you're looking to count into C1, then try
this:
=SUMPRODUCT((A2:A100=C1)*(B2:B1000)*B2:B100)
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"gmac" wrote in message
...

I want to sum all the positive values from a database for a single
criteria.

e.g. database is,
fruit buy/sell quantity
apples -5
oranges 2
apples 3
apples 1

I want to sum all the positive values only for apples. (Note my real
database has many more entries than this).

so I am sumif(database, "apples", quantity) which returns -1

what can I do to just get the positive numbers of apples ??

Help Please :)


--
gmac
------------------------------------------------------------------------
gmac's Profile:

http://www.excelforum.com/member.php...o&userid=23224
View this thread: http://www.excelforum.com/showthread...hreadid=383010