How to combine tables into a pivot and dynamically change rates

shawnw

New Member
Joined
Apr 6, 2016
Messages
34
I have two worksheets:


  1. People (shows names and hourly rates). Every row is unique. Some names that appear here will not appear on the "Effort" sheet, but this is not known in advance. The names are NOT sorted (e.g., alphabetically).
  2. Effort (shows names of people who worked on specific dates -- and a bunch of other stuff). Every row is unique. No names appear here that do not appear in the "People" sheet. The effort is NOT sorted (e.g., by date).

I am trying to create a pivot table that shows:


  1. Row: Everyone's name, rate, and hours worked
  2. Column: The month/year that effort was recorded

"PEOPLE" TABLE

ROW/COLAB
1 (HEADER)UserRate
2Aaron$100
3Bernie$100
4Charlie$100
5David$125
6Eric$150
7Frank$100
8George$75
9Harry$125
10Ian$175
11Jack$80

<tbody>
</tbody>

"EFFORT" TABLE

ROW/COLABC
1 (HEADER)NameDateEffort (Hours)
2Aaron1/1/20164
3Aaron1/2/20164
4Bernie2/7/20163
5Ian1/7/20162
6Jack1/12/20164
7Eric1/22/20162
8Bernie2/1/20161
9Eric2/1/20168
10Harry2/4/20166
11Aaron2/4/20165
12Frank4/7/20163
13Ian4/9/20164
14Eric5/3/20166
15Jack5/1/20167
16Aaron3/7/20163
17Bernie2/6/20161
18Frank4/11/20168
19Jack5/5/20168
20Eric6//20165

<tbody>
</tbody>

Note that there are no hours for Charlie, David, or George.

So the pivot chart should look something like this, which each cell showing the total of the hours for the selected time period (in this case, months). Note that I show the math, but it's the total I really care about.

NameJan 2016Feb 2016Mar 2016Apr 2016May 2016Jun 2016
Aaron4+4=853000
Bernie03+1+1=50000
Charlie000000
David000000
Eric280065
Frank0003+8=1100
George000000
Harry060000
Ian200400
Jack40007+8=150

<tbody>
</tbody>

IMPORTANT:
What I'd really like to do is multiple the effort (hours) by the rate to get the cost. The catch is that each contract has a term during which rates are set, but the rate foe a single person may change from contract to contract. And contracts/rates can change mid-month. So, for example, Aaron may have a rate of $100 (per hour) from Jan 1 to Feb 15, but starting on Feb 16 the rate jumps drops to $90. So the "People" worksheet is too simple right now, because there is only one rate per person. It really needs multiple rates per person, with (non overlapping) start and end periods for each rate. Then the pivot table would need to multiply the Effort by the appropriate Rate, depending on the date of the effort.

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,215,128
Messages
6,123,204
Members
449,090
Latest member
bes000

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