• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Consolidating excel with a million of rows

prakash

New Member
Hi There,

Hope this finds you well!

I have 3 excel sheets with each containing around 6 lakh rows (the maximum row that excel can have is 1048576). How can I arrive at one pivot consolidating data from all 3 sheets.

Thanks in advance.

Regards
Prakash
 
If you have Excel 2013 or later and have PowerQuery.

Query and merge all sheets in PQ editor. Load as connection only and to data model. Use resulting model as PivotTable source.

If using older version or do not have PQ. It's going to be significantly more difficult to do this and will require some knowledge of VBA and/or databases.

1. Using vba load each sheet into array and merge them in memory. Do note that this requires relatively powerful machine with large memory (RAM). Then load the array into PivotCache directly. You can find sample method in link below.
https://chandoo.org/forum/threads/combine-two-table-via-vba-create-pivot-from-array.39351/

2. Load data to external db, consolidate to single table. And use that as source for your PivotTable data.

3. Use intermediate workbook/sheets to aggregate data before loading to PivotTable. Note that you will lose ability to drill down to raw data level with this approach. If you need that level of drill down... you'll need to create system using VBA to extract source data from aggregated data.
 
Back
Top