Rolling up data with 3 criteria's in VBA

durdle

New Member
Joined
Aug 16, 2004
Messages
18
Good day folks,

I was wondering if someone could help me with a function that will sum up hours based on a employees timecard. It is kind of a unique setup but I think someone may have come across a similar problem. Here is the setup, I have a Raw data tab that contains:

EEID EE Name HrsWorked Rate
1 Name1 3 10
1 Name1 3 10
1 Name1 8 15
2 Name2 3 15
2 Name2 3 15
2 Name2 8 15
2 Name2 6 15
2 Name2 4 15
3 Name3 1 14
3 Name3 9 14
3 Name3 8 18
3 Name3 8 18
3 Name3 7 18

Then I have a main tab that sums up each employee based on there "Rate". The calc is this HrsWorked * Rate. But the catch is this, if the employee's rate changes this that will afect the line item on the main tab. The main tab looks like:


EE ID EE Name HrsWorked Rate Fees
1 Name1 6 10 60
2 Name1 8 15 120
3 Name2 24 15 360
2 Name3 10 14 140
2 Name3 23 18 414

I understand the VBA part on bringing over the name, but I cannot understand how to separte this data by rate? Essentically, I want to take the data from the Raw tab and transfer it over the main tab, and at the same time rolling up the data, based on the Rate. Keeping in mind that the Rate may or may not change during the time frame. If anyone could help me on this it would be great.

Thank you,
 

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.
Insert a column to the right of your raw data with the heading Fees and a formula that multiplies HrsWorked and Rate from row 2 onwards. Then create a pivot table with EEID, EE Name and Rate as Row fields and Sum of HrsWorked and Fees as Data fields.
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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