Hi!
Try this:
=SUMPRODUCT(--(A1:A4="apples"),--(B1:B40),B1:B4)
Or, use a cell to hold apples:
D1 = apples
=SUMPRODUCT(--(A1:A4=D1),--(B1:B40),B1:B4)
Biff
"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