SOLVED

Vlookup for multiple tables

%3CLINGO-SUB%20id%3D%22lingo-sub-1805003%22%20slang%3D%22en-US%22%3EVlookup%20for%20multiple%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1805003%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20attempting%20to%20find%20out%20how%20worker%20hours%20are%20allocated%20towards%20different%20'Locations'%20and%20different%20'Jobs'.%20At%20the%20bottom%20of%20my%20October%20tab%20I%20have%20for%20one%20worker%20'Wesley%20Golonka'%20whom%20has%20done%20133%20hours%20so%20far%20this%20month.%20I%20want%20to%20be%20able%20to%20get%20a%20list%20of%20where%20these%20hours%20were%20allocated%20with%20repeats%20summing%20into%20one%20row.%20For%20example%20he%20has%20done%20practically%20all%20his%20work%20at%20location%20'Fontenoy'%20with%20his%20job%20being%20'Landscaping'%20there%20-%20I%20would%20then%20want%20an%20output%20of%20say%20120%20hours%20there%20and%20the%20other%2013%20be%20associated%20with%20a%20differnt%20job%20and%20location.%20I%20would%20want%20this%20for%20all%20my%20workers.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20managed%20to%20program%20this%20for%20one%20day%20on%20sheet%201%20but%20I%20cant%20seem%20to%20stretch%20it%20so%20i%20can%20encapsulate%20the%20whole%20working%20month%2C%20i%20think%20my%20approach%20may%20be%20wrong%2C%20and%20a%20vlookup%20formula%20would%20be%20more%20suitable.%20Any%20help%20would%20be%20greatly%20appreciated!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1805003%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1806386%22%20slang%3D%22en-US%22%3ERe%3A%20Vlookup%20for%20multiple%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1806386%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F841079%22%20target%3D%22_blank%22%3E%40bencharnock%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20are%2C%20indeed%2C%20making%20a%20very%20fundamental%20(and%2C%20sadly%2C%20fairly%20common)%20mistake.%20By%20storing%20the%20raw%20data%20in%20the%20fashion%20you%20are%20using%2C%20you%20are%20actually%20%3CSTRONG%3E%3CEM%3E%3CU%3Einterfering%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E%20with%20Excel's%20amazing%20abilities%20to%20do%20the%20very%20thing%20you're%20wanting%20to%20do%3A%20produce%20a%20summary%20report%20where%20Excel%20does%20all%20the%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20re-arranged%20some%20of%20your%20raw%20data%20into%20a%20single%20database%20in%20order%20to%20show%20you%20how%20the%20Pivot%20Table%20will%20automatically%20produce%20the%20kind%20of%20summary%20you%20are%20wanting%2C%20from%20a%20single%20table.%20The%20fundamental%20advice%3A%20LET%20EXCEL%20DO%20THE%20HEAVY%20LIFTING.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20only%20did%20the%20first%20two%20weeks%20of%20october%20in%20order%20to%20illustrate%2C%20but%20once%20all%20those%20days'%20data%20were%20reassembled%20into%20a%20singe%20table%2C%20Pivot%20Table%20was%20able%20to%20produce%20the%20summary%20report%20you%20see.%20It%20probably%20isn't%20exactly%20what%20you%20want%3B%20actually%2C%20with%20a%20more%20complete%20database%20(adding%20the%20days%20from%20September%2C%20August--the%20whole%20year--%20for%20example)%20Excel%20will%20start%20giving%20you%20the%20ability%20to%20collapse%20into%20weekly%20or%20monthly%20or%20quarterly%20summaries%20by%20project%2C%20by%20person.%20There's%20a%20lot%20of%20flexibility%20in%20how%20to%20array%20the%20data.%26nbsp%3B%20But%20you%20have%20to%20let%20Excel%20do%20the%20work%20of%20separating%20data%20by%20week%2C%20by%20person%2C%20etc.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou'll%20find%20videos%20on%20YouTube%20that%20can%20help%20understand%20the%20power%20of%2C%20as%20well%20as%20how%20easy%20it%20is%20to%20use%2C%20Pivot%20Tables.%20Here's%20an%20on-line%20resource%20as%20well.%20%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fexcel-pivot-tables%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fexcel-pivot-tables%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1816141%22%20slang%3D%22en-US%22%3ERe%3A%20Vlookup%20for%20multiple%20tables%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1816141%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3BThanks%2C%20big%20help.%20The%20spreadsheet%20was%20designed%20for%20ease%20of%20use%20so%20my%20dad%20can%20easily%20see%20who's%20assigned%20where%20-%20is%20there%20a%20way%20to%20programme%20it%20so%20the%20pivot%20table%20automatically%20collects%20data%20from%20the%20separate%20tables%20(they%20all%20have%20the%20same%20headers%3F%20Or%20maybe%20get%20the%20data%20to%20automatically%20collate%20onto%20another%20table%20from%20which%20the%20pivot%20is%20created%20from%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am attempting to find out how worker hours are allocated towards different 'Locations' and different 'Jobs'. At the bottom of my October tab I have for one worker 'Wesley Golonka' whom has done 133 hours so far this month. I want to be able to get a list of where these hours were allocated with repeats summing into one row. For example he has done practically all his work at location 'Fontenoy' with his job being 'Landscaping' there - I would then want an output of say 120 hours there and the other 13 be associated with a differnt job and location. I would want this for all my workers. 

 

I have managed to program this for one day on sheet 1 but I cant seem to stretch it so i can encapsulate the whole working month, i think my approach may be wrong, and a vlookup formula would be more suitable. Any help would be greatly appreciated!!!

3 Replies
Best Response confirmed by bencharnock (New Contributor)
Solution

@bencharnock 

 

You are, indeed, making a very fundamental (and, sadly, fairly common) mistake. By storing the raw data in the fashion you are using, you are actually interfering with Excel's amazing abilities to do the very thing you're wanting to do: produce a summary report where Excel does all the work.

 

I've re-arranged some of your raw data into a single database in order to show you how the Pivot Table will automatically produce the kind of summary you are wanting, from a single table. The fundamental advice: LET EXCEL DO THE HEAVY LIFTING.

 

I only did the first two weeks of october in order to illustrate, but once all those days' data were reassembled into a singe table, Pivot Table was able to produce the summary report you see. It probably isn't exactly what you want; actually, with a more complete database (adding the days from September, August--the whole year-- for example) Excel will start giving you the ability to collapse into weekly or monthly or quarterly summaries by project, by person. There's a lot of flexibility in how to array the data.  But you have to let Excel do the work of separating data by week, by person, etc.

 

You'll find videos on YouTube that can help understand the power of, as well as how easy it is to use, Pivot Tables. Here's an on-line resource as well. https://exceljet.net/excel-pivot-tables

 

@mathetes Thanks, big help. The spreadsheet was designed for ease of use so my dad can easily see who's assigned where - is there a way to programme it so the pivot table automatically collects data from the separate tables (they all have the same headers? Or maybe get the data to automatically collate onto another table from which the pivot is created from? 

@bencharnock 

 

For the time being, I am going to stand by my contention that in creating separate input tables for each day, you are perhaps making it easier for your Dad at present to see where each person is assigned, but in the long run you are inevitably getting in the way of true ease of use and even true clarity. 

 

[Just for the record, before you can come back here with the comment that your Dad is too old to relate to a different design, you need to understand that I'm turning 79 this coming week; I doubt your Dad is any further into his senior years. I think we old  folks are fully capable of understanding spreadsheets.]

 

So let me ask you this: WHO does the actual data entry, first of all? I'm going to assume it's not your Dad, but even if it is, I'd continue to advocate collecting all input data on a single table. It would take learning to differentiate between that step and the output.

 

Then, once all the data are collected in a single database, you can create some output ("dashboard" is the word often used) screens that give the "ease of use in seeing where people are assigned" aspect of it. Those are both variations on output, and easily structured.

 

The Pivot Table automatically gets the data from a table (rows added to an officially designated Excel Table are automatically included in revised reports. You do need to click on "Refresh Data"...and depending on how the pivot table is designed, you may need to set a filter for a different month when the calendar flips over.

 

A separate sheet or screen can be designed to show who's assigned where on any given date, extracting that data from the single database. The information does have to be entered, but once entered can be displayed, and the dashboard sheet could be designed to show assignments for the week, for the last two days, whatever. That's an output design issue to be discussed.

 

Just don't design your data collection (the input) to do anything other than collect data; making it serve that other purpose really does get in the way, no matter how "clear" it might be on days one and two.