Unique values from multiple sheets

tezza

Board Regular
Joined
Sep 10, 2006
Messages
244
Office Version
  1. 365
  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
 

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
12,151
Office Version
  1. 2013
  2. 2010
Platform
  1. Windows
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
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,176,085
Messages
5,901,295
Members
434,886
Latest member
qazibelal

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
Top