Sumproduct help

PivotIdiot

Board Regular
Joined
Jul 8, 2010
Messages
76
Office Version
  1. 365
Platform
  1. Windows
Hi All, hoping someone can help me out again?

I have a small table of rates that i can use INDEX or SUMPRODUCT to find a specific rate based on the role and subcontractor.

I have another column of hours that i would like to use this rate on.
Next to the hours column is another column that specifies the subcontractor to use.

I cant seem to nail this one down and i presume its because i'm trying to do too much in one formula.

=sumproduct( (HOURS * ((subcon=subcontractor) * (RoleRef=Role) * (Rates) )

HOURS = B2:B18
subcon = A2:A18
Subcontractor = H1:K1
Roleref = B1
Role = G2:G10
Rates =H2:K10


Can anyone help?

Thanks, Dan
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
[TABLE="width: 1024"]
<tbody>[TR]
[TD="width: 64"]Role=[/TD]
[TD="class: xl66, width: 64"]4[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="class: xl66, width: 64"]ref[/TD]
[TD="class: xl66, width: 64"]John[/TD]
[TD="class: xl66, width: 64"]Jeff[/TD]
[TD="class: xl66, width: 64"]James[/TD]
[TD="class: xl66, width: 64"]Jerald[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="class: xl66"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]8[/TD]
[TD="class: xl66"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl65, colspan: 2"]HOURS = B2:B18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD="class: xl66"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl65, colspan: 2"]subcon = A2:A18[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]James[/TD]
[TD="class: xl66"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]6[/TD]
[TD="class: xl66"]7[/TD]
[TD="class: xl66"]8[/TD]
[TD="class: xl66"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl65, colspan: 2"]Subcontractor = H1:K1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jerald[/TD]
[TD="class: xl66"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]9[/TD]
[TD="class: xl66"]9[/TD]
[TD="class: xl66"]8[/TD]
[TD="class: xl66"]9[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl65, colspan: 2"]Roleref = B1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl65, colspan: 2"]Role = G2:G10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD="class: xl66"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]6[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]6[/TD]
[TD="class: xl66"]6[/TD]
[TD="class: xl66"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl65, colspan: 2"]Rates =H2:K10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD="class: xl66"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]7[/TD]
[TD="class: xl66"]9[/TD]
[TD="class: xl66"]9[/TD]
[TD="class: xl66"]8[/TD]
[TD="class: xl66"]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jerald[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]8[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"]9[/TD]
[TD="class: xl66"]12[/TD]
[TD="class: xl66"]14[/TD]
[TD="class: xl66"]16[/TD]
[TD="class: xl66"]14[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD="class: xl66"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]James[/TD]
[TD="class: xl66"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jerald[/TD]
[TD="class: xl66"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD="class: xl66"]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff[/TD]
[TD="class: xl66"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jerald[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="class: xl66"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl66"]SUMPRODUCT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD="class: xl66"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
I'm thinking i need the extra column to pull the rate for each contractor, then sumproduct the two columns.
I cant do this however so I think its a no go?

Dan
 
Upvote 0
I tried using an array formula but I couldn't get it to play ball so I had to use a helper column:


Book1
ABCDEFGHIJK
11refJohnJeffJamesJerald
2John2414685
3Jeff4622423
4James6836786
5Jerald8549989
6John3452322
7Jeff0664665
8Jeff1679989
9Jerald3582322
10John34912141614
11Jeff46
12James68
13Jerald85
14John34
15Jeff06
16Jeff16
17Jerald35
18John34
19
20322
Sheet1
Cell Formulas
RangeFormula
B20=SUMPRODUCT(HOURS,CalculatedRates)
C2=INDEX(Rates,MATCH(Roleref,Role,0),MATCH($A2,Subcontractor,0))
Named Ranges
NameRefers ToCells
CalculatedRates=Sheet1!$C$2:$C$18
HOURS=Sheet1!$B$2:$B$18
Rates=Sheet1!$H$2:$K$10
Role=Sheet1!$G$2:$G$10
Roleref=Sheet1!$B$1
Subcon=Sheet1!$A$2:$A$18
Subcontractor=Sheet1!$H$1:$K$1


Still thinking about it though ...

WBD
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top