John Luther
New Member
- Joined
- May 5, 2014
- Messages
- 28
Hi,
I am trying to solve a problem using sumproduct but can't quite figure it out:
I have a table (illustrated below) in which I'm trying to sum the total cost (column D) when the status (column C) is equal to or greater than 6 for any particular customer (column B) on a work order (column A). So for this data set, I do not want a sum that includes row 2 for example, even though it meets all the criteria, because the same customer on the same work order in the next row, has a status of 4. I only want to sum the cost of the "complete" orders, when every row for a customer/work order is status 6 or 7. I can do this with a helper column but I want to avoid that if possible. I hope I've been able to communicate my problem effectively. I'd appreciate any help I can get.
<colgroup><col style="mso-width-source:userset;mso-width-alt:768;width:16pt" width="21"> <col style="width:65pt" width="86" span="3"> <col style="width:65pt" width="86"> </colgroup><tbody>
[TD="class: xl65, width: 21"][/TD]
[TD="class: xl65, width: 86"]A[/TD]
[TD="class: xl65, width: 86"]B[/TD]
[TD="class: xl65, width: 86"]C[/TD]
[TD="class: xl71, width: 86"]D[/TD]
[TD="class: xl65"]1[/TD]
[TD="class: xl66"]WO
[/TD]
[TD="class: xl66"]CUSTOMER[/TD]
[TD="class: xl66"]STATUS[/TD]
[TD="class: xl70"]COST[/TD]
[TD="class: xl65"]2[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]ATLRAL[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl71"]$395.00[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]ATLRAL[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl71"]$222.00[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]BILSYL[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl71"]$159.00[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl68"]10/18/17[/TD]
[TD="class: xl69"]DIATEM[/TD]
[TD="class: xl69"]6[/TD]
[TD="class: xl72"]$3,000.00[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl68"]10/18/17[/TD]
[TD="class: xl69"]DIATEM[/TD]
[TD="class: xl69"]6[/TD]
[TD="class: xl72"]$2,000.00[/TD]
[TD="class: xl65"]7[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]ROBTAM[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl71"]$223.00[/TD]
[TD="class: xl65"]8[/TD]
[TD="class: xl68"]10/18/17[/TD]
[TD="class: xl69"]VALSAL[/TD]
[TD="class: xl69"]6[/TD]
[TD="class: xl72"]$50.00[/TD]
[TD="class: xl65"]9[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]BILHOU[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl71"]$1,852.00[/TD]
[TD="class: xl65"]10[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]BILHOU[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl71"]$2,310.00[/TD]
[TD="class: xl65"]11[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]DAVSTO[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$1,400.00[/TD]
[TD="class: xl65"]12[/TD]
[TD="class: xl67"]10/25/17[/TD]
[TD="class: xl65"]DIATEM[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl71"]$2,796.00[/TD]
[TD="class: xl65"]13[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$2,142.00[/TD]
[TD="class: xl65"]14[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$499.00[/TD]
[TD="class: xl65"]15[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$595.00[/TD]
[TD="class: xl65"]16[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$838.00[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl73"][/TD]
[TD="class: xl73"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl74"]SUM OF COMPLETED ORDERS=[/TD]
[TD="class: xl71"]$10,524.00[/TD]
</tbody>
Thanks,
John
I am trying to solve a problem using sumproduct but can't quite figure it out:
I have a table (illustrated below) in which I'm trying to sum the total cost (column D) when the status (column C) is equal to or greater than 6 for any particular customer (column B) on a work order (column A). So for this data set, I do not want a sum that includes row 2 for example, even though it meets all the criteria, because the same customer on the same work order in the next row, has a status of 4. I only want to sum the cost of the "complete" orders, when every row for a customer/work order is status 6 or 7. I can do this with a helper column but I want to avoid that if possible. I hope I've been able to communicate my problem effectively. I'd appreciate any help I can get.
<colgroup><col style="mso-width-source:userset;mso-width-alt:768;width:16pt" width="21"> <col style="width:65pt" width="86" span="3"> <col style="width:65pt" width="86"> </colgroup><tbody>
[TD="class: xl65, width: 21"][/TD]
[TD="class: xl65, width: 86"]A[/TD]
[TD="class: xl65, width: 86"]B[/TD]
[TD="class: xl65, width: 86"]C[/TD]
[TD="class: xl71, width: 86"]D[/TD]
[TD="class: xl65"]1[/TD]
[TD="class: xl66"]WO
[/TD]
[TD="class: xl66"]CUSTOMER[/TD]
[TD="class: xl66"]STATUS[/TD]
[TD="class: xl70"]COST[/TD]
[TD="class: xl65"]2[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]ATLRAL[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl71"]$395.00[/TD]
[TD="class: xl65"]3[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]ATLRAL[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl71"]$222.00[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]BILSYL[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl71"]$159.00[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl68"]10/18/17[/TD]
[TD="class: xl69"]DIATEM[/TD]
[TD="class: xl69"]6[/TD]
[TD="class: xl72"]$3,000.00[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl68"]10/18/17[/TD]
[TD="class: xl69"]DIATEM[/TD]
[TD="class: xl69"]6[/TD]
[TD="class: xl72"]$2,000.00[/TD]
[TD="class: xl65"]7[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]ROBTAM[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl71"]$223.00[/TD]
[TD="class: xl65"]8[/TD]
[TD="class: xl68"]10/18/17[/TD]
[TD="class: xl69"]VALSAL[/TD]
[TD="class: xl69"]6[/TD]
[TD="class: xl72"]$50.00[/TD]
[TD="class: xl65"]9[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]BILHOU[/TD]
[TD="class: xl65"]5[/TD]
[TD="class: xl71"]$1,852.00[/TD]
[TD="class: xl65"]10[/TD]
[TD="class: xl67"]10/18/17[/TD]
[TD="class: xl65"]BILHOU[/TD]
[TD="class: xl65"]6[/TD]
[TD="class: xl71"]$2,310.00[/TD]
[TD="class: xl65"]11[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]DAVSTO[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$1,400.00[/TD]
[TD="class: xl65"]12[/TD]
[TD="class: xl67"]10/25/17[/TD]
[TD="class: xl65"]DIATEM[/TD]
[TD="class: xl65"]4[/TD]
[TD="class: xl71"]$2,796.00[/TD]
[TD="class: xl65"]13[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$2,142.00[/TD]
[TD="class: xl65"]14[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$499.00[/TD]
[TD="class: xl65"]15[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$595.00[/TD]
[TD="class: xl65"]16[/TD]
[TD="class: xl68"]10/25/17[/TD]
[TD="class: xl69"]FURJAM[/TD]
[TD="class: xl69"]7[/TD]
[TD="class: xl72"]$838.00[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl73"][/TD]
[TD="class: xl73"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl74"]SUM OF COMPLETED ORDERS=[/TD]
[TD="class: xl71"]$10,524.00[/TD]
</tbody>
Thanks,
John