View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default SumIF column A = x and Column B = x OR x

=SUMPRODUCT(--(A2:A100="212")*(B2:B100)={"31C1","31A2"})*(C2:C10 0))


"A Heeps" wrote:

Does anyone know how I can use SumIf to calculate the following?

Column A Contract Hrs Cost
212 31C1 10 12
209 31C1 12 40
303 31C1 12 12
212 31C8 10 12
209 31C8 10 40
212 31A2 10 40
209 31A2 5 80

I need to be able to SUMIF Column A = (e.g.) 212 and Contract = 31C1 or
31A2, I need it to tell me the total hours

Any ideas?

Thanks
Amanda