SOLVED

Using Pivot Table to Consolidate multiple rows of data

%3CLINGO-SUB%20id%3D%22lingo-sub-2479146%22%20slang%3D%22en-US%22%3EUsing%20Pivot%20Table%20to%20Consolidate%20multiple%20rows%20of%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2479146%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20attempting%20to%20consolidate%20open%20and%20close%20times%20from%20a%20table%20into%20a%20Pivot%20Table.%20Times%20for%20Monday%2C%20Wednesday%2C%20and%20Friday%20are%20entered%20in%20one%20row%20while%20Tuesday%2C%20Thursday%2C%20and%20Saturday%20are%20entered%20in%20another.%20All%20the%20rows%20have%20an%20account%20number.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20entered%20into%20the%20PivotTable%2C%20there%20is%20no%20consolidation%20based%20on%20the%20account%20number%20-%20the%20data%20is%20pivoted%20exactly%20how%20it%20appears%20in%20the%20table%20-%20Blanks%20for%20the%20days%20where%20there%20is%20no%20open%20time%20and%20multiple%20lines%20if%20the%20account%20has%20hours%20that%20differ%20by%20day.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attached%20the%20workbook%20-%20Worksheet%20%22TW%20Template%22%20contains%20the%20data%20(Account%20number%20in%20column%20A%3B%20Open%2F%20Close%20times%20in%20columns%20AC%20through%20AP).%20%22PIVOT-HOO%22%20is%20my%20attempt%20at%20consolidating%20the%20data%20with%20a%20PivotTable.%20Ideally%2C%20each%20account%20would%20only%20have%20one%20row%20of%20open%2F%20close%20times.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20any%20assistance%20or%20alternative%20solutions%20that%20can%20be%20offered.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2479146%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2480565%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20Pivot%20Table%20to%20Consolidate%20multiple%20rows%20of%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2480565%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1086634%22%20target%3D%22_blank%22%3E%40Nrussell12586%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EJust%20looking%20at%20your%20workbook%2C%20my%20guess%20is%20that%20the%20problem%20here%20has%20to%20do%20with%20the%20way%20your%20database%20is%20arrayed.%20You've%20done%20already%20some%20of%20the%20work%20of%20a%20Pivot%20Table--i.e.%2C%20in%20columns%20Y%20through%20AL%20(under%20the%20red%20heading)%20you've%20already%20done%20some%20cross-tabulating--and%20that%20interferes%20with%20things.%20As%20Obi-wan%20says%2C%20%22Trust%20the%20Force%2C%20Luke%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20done%20Pivot%20tables%20in%20the%20past%3F%20Here's%20one%20of%20any%20number%20of%20good%20resources%20of%20%22Tips%22%20to%20create%20well-functioning%20Pivot%20Tables.%20You'll%20see%20that%20having%20clean%20and%20well%20organized%20source%20data%20is%20right%20at%20the%20top%20of%20the%20list.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fexceljet.net%2Fpivot-table-tips%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fexceljet.net%2Fpivot-table-tips%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2483298%22%20slang%3D%22en-US%22%3ERe%3A%20Using%20Pivot%20Table%20to%20Consolidate%20multiple%20rows%20of%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2483298%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1086634%22%20target%3D%22_blank%22%3E%40Nrussell12586%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20more%20job%20for%20Power%20Query%2C%20please%20check%20in%20Sheet2%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello,

 

I am attempting to consolidate open and close times from a table into a Pivot Table. Times for Monday, Wednesday, and Friday are entered in one row while Tuesday, Thursday, and Saturday are entered in another. All the rows have an account number. 

 

When entered into the PivotTable, there is no consolidation based on the account number - the data is pivoted exactly how it appears in the table - Blanks for the days where there is no open time and multiple lines if the account has hours that differ by day.

 

I've attached the workbook - Worksheet "TW Template" contains the data (Account number in column A; Open/ Close times in columns AC through AP). "PIVOT-HOO" is my attempt at consolidating the data with a PivotTable. Ideally, each account would only have one row of open/ close times.

 

Appreciate any assistance or alternative solutions that can be offered.

4 Replies

@Nrussell12586 

 

Just looking at your workbook, my guess is that the problem here has to do with the way your database is arrayed. You've done already some of the work of a Pivot Table--i.e., in columns Y through AL (under the red heading) you've already done some cross-tabulating--and that interferes with things. As Obi-wan says, "Trust the Force, Luke"

 

Have you done Pivot tables in the past? Here's one of any number of good resources of "Tips" to create well-functioning Pivot Tables. You'll see that having clean and well organized source data is right at the top of the list. https://exceljet.net/pivot-table-tips

 

best response confirmed by Nrussell12586 (New Contributor)
Solution

@Nrussell12586 

That's more job for Power Query, please check in Sheet2 attached.

@mathetes - I've used PivotTables quite a bit, but never for anything like this. I wasn't sure if the PivotTable would be able to break the times out for the respective days, hence all those extra columns. 

 

Thanks for the link - Always love using ExcelJet to brush up on things!

@Sergei Baklan - That will open up a new world for me. I've not opened Power Query until now. Thank you for your assistance and for opening up this gateway!