Pulling data from multiple sheets

TAPS_MikeDion

Well-known Member
Joined
Aug 14, 2009
Messages
622
Office Version
  1. 2011
Platform
  1. MacOS
Hi Excelers,

My workbook holds numerous "location" sheets (all have 3-letter abbreviations - i.e. BGE, HPV, etc.)
In these location sheets, there are columns with employee last & first names, then 1 WAL (Works At Location) column, and finally 1 column for each day of the month (i.e. 1-31. The example below goes to 5, just to keep it short.)
The number of hours an employee worked at any given location for any given day of a month is entered into each DAY OF THE MONTH column.
In the BGE example sheet below, Tom West DOES NOT work at this location. Each sheet is sorted by the WAL column (alphabetically) so that only the employees at that location are shown when viewing that location sheet, which would have Tom West hidden if I was looking at this sheet. And, in the HPV example sheet below, Jane Doe & Mark Jones would be hidden when viewing that sheet.


Example: This we'll call BGE sheet.

LAST NAMEFIRST NAMEWAL12345
DoeJanex888
JonesMarkx666
WestTom



Example: This we'll call HPV sheet.

LAST NAMEFIRST NAMEWAL12345
DoeJane
JonesMark
WestTomx3333



Finally, there is a Summary sheet with columns for the employees last & first names, and ALL locations, which shows the TOTAL hours worked for each employee at any given location.

LAST NAMEFIRST NAMEBGEHPV
DoeJane24
JonesMark18
WestTom12


My question is:
How do I have the data from all of the "location" sheets show correctly in the Summary sheet if each "location" sheet is sorted differently, due to the WAL sorting done on each location sheet?

THANK YOU to anyone that can offer assistance with this, because I'm going insane trying to figure this out.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
How about
=SUM(INDEX(BGE!$D$2:$H$4,MATCH(A2&"|"&B2,INDEX(BGE!$A$2:$A$4&"|"&BGE!$B$2:$B$4,0),0),0))
 
Upvote 0
Standby...trying to catch my head, it's spinning out of control. LOL

First, thank you for the reply Fluff.
Second, could you run through the formula for me so that I can adapt it correctly?

Thanks a bunch, I appreciate it!
 
Upvote 0
Does this help you adapt it

Book1
ABCDEFGH
1LAST NAMEFIRST NAMEWAL12345
2DoeJanex888
3JonesMarkx666
4WestTom
BGE


Book1
ABCDEFGH
1LAST NAMEFIRST NAMEWAL12345
2WestTomx3333
3DoeJane
4JonesMark
HPV


Book1
ABCD
1LAST NAMEFIRST NAMEBGEHPV
2DoeJane240
3JonesMark180
4WestTom012
Sheet3
Cell Formulas
RangeFormula
C2:C4C2=SUM(INDEX(BGE!$D$2:$H$4,MATCH(A2&"|"&B2,INDEX(BGE!$A$2:$A$4&"|"&BGE!$B$2:$B$4,0),0),0))
D2:D4D2=SUM(INDEX(HPV!$D$2:$H$4,MATCH(A2&"|"&B2,INDEX(HPV!$A$2:$A$4&"|"&HPV!$B$2:$B$4,0),0),0))
 
Upvote 0
As always, Fluff, you're awesome!
I'm going to try this in the AM as I'm running out of time tonight.
Have a great night and I'll reply tomorrow after I've tried this.
 
Upvote 0
And the Excel Genius Award goes to Fluff!
Thanks again!
Works perfectly after making the adaptation changes for my workbook.
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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