Sum if criteria in another table is matches criteria in sum table.

BigShoes

New Member
Joined
Apr 28, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I am building a spreadsheet that splits out money between subcontractors and their equipment. I have a table where I store the equipment and the owners and the percentage of hour rate that each piece of equipment gets. Then on another sheet, I have it set up to put in the job information, money earned and so forth, and have a table that splits out the money that each piece of equipment earns based on hours worked and percentage of hourly rate. The last piece of the puzzle is where I can't get the logic to come together for me. Each subcontractor has several pieces of equipment and I need a total of the money that gets paid to each one. It needs to be dynamic since each job will have different subs working, but they will always be out of the same pool of subcontractors. How do I construct a formula that totals the amount each sub earned? I'm pasting a simplified version of my spreadsheet for your perusal.
1685138659520.png
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
@BigShoes Welcome.
Maybe just employ a 'Helper' column?
Shown here separated to column L but could be F or anywhere. Can be hidden if you wish.
MayMrXL.xlsm
ABCDEFGHIJKL
1
2RigHoursRateTotalNettRigsPercentageOwnerHelper
3Tractor #15729Tractor #1100%Company 1Company 1
4Tractor #228101Tractor #2100%Company 1Company 1
5Tractor #310157Tractor #3100%Company 1Company 1
6Rig #718249Rig #4100%Company 2Company 3
7Rig #536754Rig #5100%Company 2Company 2
8Marilyns Rig6268Rig #6100%Company 2Company 4
9Rig #7100%Company 3 
10Marilyns Rig100%Company 4 
11 Panama Scraper20%Company 3 
12 N's Rig89%Company 2 
13 F's Bucket11%Company 1 
14
15
16
17
18
19
20
21
22
23Job DisbursmentTotal
24Company 143987
25Company 236754
26Company 318249
27Company 46268
28 
29 
Sheet11
Cell Formulas
RangeFormula
F11:F13F11=IF(A11="","",XLOOKUP(A11,H$2:H$18,J$2:J$18,"!!",0))
L3:L13L3=IF(A3="","",XLOOKUP(A3,H$2:H$18,J$2:J$18,"!!",0))
B24:B29B24=IF(A24="","",SUMIF(L$3:L$13,A24,E$3:E$13))


Hope that helps.
 
Upvote 0
Solution
Thanks for your help, Snakehips. Interestingly enough this is the solution I came up with myself after I had posted for help! I was hoping for a pure formulaic solution, but I just couldn't get anything to work and this is fine. I think I will take your suggestion and hide my helper columns just to keep everything tidy. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,215,091
Messages
6,123,062
Members
449,089
Latest member
ikke

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