View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Complex conditions using SUMIF

SUMPRODUCT is the key to using multiple conditions.

=SUMPRODUCT(--(B2:B10="A"),--(C2:C100),C2:C10)

Note that you can add another criteria to check by Employee, if you wanted:
=SUMPRODUCT(--(A2:A10="Emp #1"),--(B2:B10="A"),--(C2:C100),C2:C10)

Just make sure that all the array sizes withing SUMPRODUCT are the same size.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Booweezie" wrote:

Hi Smart Folk:

I need to analyze employee date and am having problems. Here's my data:

Employee Number Status Amount
--------------------- ------- ---------
Emp #1 A $3.00
Emp #1 T ($2.25)
Emp #1 T $14.00
Emp #1 A ($7.50)
Emp #1 A $1.30

I need to know the sum of Amount by employment status ONLY if the amount is
greater than zero. The answers for this table that I want to get a

A = $4.30
T = $14.00

I can use the SUMIF function to get a total for A's and T's; but I'm lost on
how I can limit it only to amounts greater than zero.

Thanks for any help you can provide.

--
~~Boo