Unique values from multiple sheets

tezza

Active Member
Joined
Sep 10, 2006
Messages
375
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
  2. Web
Hi All

I've got a bit of a project going on here and may need a bit of help if possible please?

First bit, I would like to list all of the staff within the company based on multiple sheets of data as staff come and go so not all sheets are the exactsame.

Sheets labels
WK 1, WK 2, ...... WK 51, WK 52 (so week 1 to 52)

Cell A2 down lists staff employee numbers
Col B2 down lists staff names
Col C2 down shows total hours they worked that week

1) How would I go about creating a summary sheet that grabs both the unique staff number, name (together) and hours from all sheets then list everyone into the summary sheet once per emp num and name

2) Count how many times the above has appeared over the 52 weeks so I can work out pro-rata later on.

My list will then show each staff emp no, staff name, Weeks staff appears, total hours worked over 52 weeks, average hours worked (total hours/times appeared)

EG: (minus the ____ as they're just for spacing purpose here)

No:___Name__Appears___Sum of hours___Avg weekly hours
1234_Tezza______20___________500____________=500/20
Next unique staff.....

There are breaks between some of the sheets unfortunately so it'll have to search name specific but having numbers that increment will hopefully make it easier?

See what you think at least :)

Kind regards
Tezza
 
Replace this line of code:
VBA Code:
desWS.UsedRange.Offset(1).ClearContents
with this line:
VBA Code:
desWS.Range("A2", desWS.Range("G" & Rows.Count).End(xlUp)).ClearContents
 
Upvote 0

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,215,063
Messages
6,122,928
Members
449,094
Latest member
teemeren

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