Summary sheets Using Array

Jmoz092

Board Regular
Joined
Sep 8, 2017
Messages
182
I've been asked to provide a summary of payroll by department. I have timesheets (workbooks) for each employee, and a summary workbook that looks up data in each of those workbooks. Each worksheet in the Summary workbook is titled as the date of the pay period, and each employee's name is listed in rows. Column K has each employee's gross pay.

I've listed our departments on Sheet12 (named "Departments") as such:

Department
12-1-1712-15-1712-29-17
A
B
C
D
E
F

<tbody>
</tbody>

Each Department has a an array of employees listed on Sheet11 (named "Reference") as such:

Dept ADept BDept CDept DDept EDept F
employee1employee3employee5employee7employee9employee11
employee2employee4employee6employee8employee10employee12

<tbody>
</tbody>

Each Department is a named array of rows 2:101 (department name in row 1).

How can I have each department's gross pay displayed in the table on Sheet12 by pay period? Worksheet formulas or VBA solution is ok. I just need to future-proof it so that it can accommodate new employees.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I've tried using the following formula in B2 of the first table in the previous post (Department A's total payroll for 12-1-17) but I'm only returning the first payroll value for the employee that is listed in department A on the reference sheet.

Code:
[COLOR=#000000][FONT=&quot][SIZE=3]{=SUMIF('12-01-17'!A15:A29,Dept A, '12-01-17'!K15:K29)}[/SIZE][/FONT][/COLOR]
 
Upvote 0
I've been asked to provide a summary of payroll by department. I have timesheets (workbooks) for each employee, and a summary workbook that looks up data in each of those workbooks. Each worksheet in the Summary workbook is titled as the date of the pay period, and each employee's name is listed in rows. Column K has each employee's gross pay.

I've listed our departments on Sheet12 (named "Departments") as such:

Department12-1-1712-15-1712-29-17
A
B
C
D
E
F

<tbody>
</tbody>

Each Department has a an array of employees listed on Sheet11 (named "Reference") as such:

Dept ADept BDept CDept DDept EDept F
employee1employee3employee5employee7employee9employee11
employee2employee4employee6employee8employee10employee12

<tbody>
</tbody>

Each Department is a named array of rows 2:101 (department name in row 1).

How can I have each department's gross pay displayed in the table on Sheet12 by pay period? Worksheet formulas or VBA solution is ok. I just need to future-proof it so that it can accommodate new employees.

1. Make a new worksheet. call it "Names"
2. In A1, type in "period"
3. ** assuming that u have 5 periods for this comment: "Each worksheet in the Summary workbook is titled as the date of the pay period"
3. - Type the names of each worksheet from cells A2 to A6
4. Select a2:a6
5. define name
6. call it "period"
7. Go to the first of your 5 worksheets, select the entire table, define name, type in the title from worksheet Names A2
8. repeat for the remaining 4 worksheets.

9. Go to your summary worksheet that u are suppose to make
10. Click on any available cell (b1)
11. click data
12. click data validation
13. select List
14. type in "=period" without quotations (you have created a drop down list with your 5 pay periods)

Assuming your names are in summary!A1:A6
15. in your summary tab

Type in:
=Vlookup(A1,indirect(b1),COLUMN#,false)

This is what you want to do whether it is a sumif or a vlookup. You want to indirectly reference B1 <-- your dropdown list, aka "period" which is a list containing the names of your worksheets.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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