By-line totals

dmj120

Active Member
Joined
Jan 5, 2010
Messages
308
Office Version
  1. 365
  2. 2019
  3. 2010
I am trying to create a summary table of expenses for a massive project for 35 people (each assigned a "type"). My data set is:

[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Type
[/TD]
[TD]Pay Rate
[/TD]
[TD]Days
[/TD]
[TD]Hotel
[/TD]
[TD]Per Diem
[/TD]
[TD]total
[/TD]
[/TR]
[TR]
[TD]1099
[/TD]
[TD]15.00
[/TD]
[TD]15
[/TD]
[TD]0
[/TD]
[TD]50
[/TD]
[TD]=((pay*8)*days)+hotel+per diem -- $1850
[/TD]
[/TR]
[TR]
[TD]1099
[/TD]
[TD]18.00
[/TD]
[TD]20
[/TD]
[TD]500
[/TD]
[TD]50
[/TD]
[TD]$3430
[/TD]
[/TR]
[TR]
[TD]Internal
[/TD]
[TD]35.00
[/TD]
[TD]10
[/TD]
[TD]200
[/TD]
[TD]50
[/TD]
[TD]$3050
[/TD]
[/TR]
[TR]
[TD]Vendor
[/TD]
[TD]100.00
[/TD]
[TD]10
[/TD]
[TD]0
[/TD]
[TD]50
[/TD]
[TD].....
[/TD]
[/TR]
</tbody>[/TABLE]


My summary table is:

[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Type
[/TD]
[TD]Pay
[/TD]
[TD]Hotel
[/TD]
[TD]Per Diem
[/TD]
[TD]Total
[/TD]
[/TR]
[TR]
[TD]1099
[/TD]
[TD]$5280
[/TD]
[TD]sumifs()
[/TD]
[TD]sumifs()
[/TD]
[TD]sum(b2:d2)
[/TD]
[/TR]
[TR]
[TD]Internal
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Vendor
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

The hotel and Per Diem are easily done with sumifs(). I'm running into an issue with the types because each type has to have the individual row calculated then totaled.

It would be something like sum( (b2*8)*c2), (b3*8)*c3), etc. ) but I don't want to hard code it - more are being added everyday, so I'd like to have a simple formula to find, calculate and add everything.

Thanks for any ideas.
Josh
 
This is my take on the full set


Excel 2013/2016
ABCDEF
1TypePay RateDaysHotelPer Diemtotal
2109915150501850
310991820500503430
4Internal3510200503050
5Vendor100100508050
6
7
8TypePayHotelPer DiemTotal
9109946805001005280
10Internal2800200503050
11Vendor80000508050
Sheet2
Cell Formulas
RangeFormula
F2=B2*8*C2+D2+E2
B9=SUMPRODUCT(--($A$2:$A$5=$A9),($B$2:$B$5)*($C$2:$C$5)*8)
C9=SUMIF($A$2:$A$5,$A9,D$2:D$5)
D9=SUMIF($A$2:$A$5,$A9,E$2:E$5)
E9=SUM(B9:D9)
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Haven't been on for couple of weeks.

My take on the "Full set" in Post # 10 is based on OP's answer in Post # 7 for my question in Post # 4 (where "Per Diem" - by definition, is per day).
 
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