Consolidate data from multiple sheets in an overall table on a final sheet

ayeready

New Member
Joined
Oct 26, 2018
Messages
18
Hi. Looking for a solution to this in an attempt to consolidate weekly sheets in to a monthly overall value.

I have a spreadsheet with 6 sheets. WK1-5 then a Totals sheet.
Sheets WK1-5 are identical in layout to below.

Book1
BCDEFGHI
5Week1Possible SalesConf OppsSales
6StaffSale NumberGreyBlackGreyBlackGreyBlack
7Megan1587101010
8Megan1588111111
9Megan1599001111
10Alison1601001111
11Gail1605001111
12Robbie1612001111
13Megan1622111111
14Sean1630101010
WK1


I'm looking to work out how to total each weeks sheet so that there is only one line per staff member and a full total of all 5 weeks figures beside them.

Book1
BCDEFGH
4TotalsPossiblesOpportunitiesCaptures
5StaffGreyBlackGreyBlackGreyBlack
6Megan324343
7Alison001111
8Gail001111
9Robbie001111
10Sean101010
11
12
13
14
15
16
Totals


I've attempted a VLOOKUP but can't get it to work and also tried an INDEX/MATCH lookup using arrays to match the staff member to then populate the necessary fields but i think this is a bit above my knowledge levels unfortunately.

Anyone have any ideas?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
maybe with Power Query

Column1Column2Column3Column4Column5Column6Column7Column8StaffP-GreyP-BlackO-GreyO-BlackS-GreyS-Black
Week1Possible SalesConf OppsSalesMegan324343
StaffSale NumberGreyBlackGreyBlackGreyBlackAlison001111
Megan1587101010Gail001111
Megan1588111111Robbie001111
Megan1599001111Sean101010
Alison1601001111
Gail1605001111
Robbie1612001111
Megan1622111111
Sean1630101010


Code:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Rename = Table.RenameColumns(Table.PromoteHeaders(Table.PromoteHeaders(Source, [PromoteAllScalars=true]), [PromoteAllScalars=true]),{{"Black_2", "Black_1"}, {"Grey_3", "Grey_2"}, {"Black_4", "Black_2"}}),
    Group = Table.Group(Rename, {"Staff"}, {{"P-Grey", each List.Sum([Grey]), type number}, {"P-Black", each List.Sum([Black]), type number}, {"O-Grey", each List.Sum([Grey_1]), type number}, {"O-Black", each List.Sum([Black_1]), type number}, {"S-Grey", each List.Sum([Grey_2]), type number}, {"S-Black", each List.Sum([Black_2]), type number}})
in
    Group
 
Upvote 0
Thanks Sandy.

Forgive me if i've picked you up wrong but would this not only total 1 sheet at a time rather than an overall total for all sheets?
 
Upvote 0
Hi Sandy

Managed to get the PowerQuery to work but was wondering if the totals table could be a live link to the other sheets? i.e. when lines are added/removed/amended this is automatically reflected in the totals sheet.
 
Upvote 0
right click on result table and select Refresh or use Alt+Ctrl+F5

edit:

another way is define Refresh time in connections, from 1 to 999 minutes
 
Last edited:
Upvote 0
Sorry Sandy. Think my knowledge of PoweyQwery is letting me down.

I created the table by consolidating the 5 weeks in to a table. I'm assuming thats the wrong way to do it?
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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