ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   SumIF column A = x and Column B = x OR x (https://www.excelbanter.com/excel-worksheet-functions/137059-sumif-column-%3D-x-column-b-%3D-x-x.html)

A Heeps

SumIF column A = x and Column B = x OR x
 
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



Toppers

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



Teethless mama

SumIF column A = x and Column B = x OR x
 
=SUMPRODUCT((A2:A100="212")*(B2:B100={"31C1","31A2 "})*(C2:C100))


"Toppers" wrote:

=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




All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com