How to consolidate data that is different shapes [BYOD]

Share

Facebook
Twitter
LinkedIn

Last week, I asked my email newsletter readers to submit “one data analysis problem you are struggling with”. We called it BYOD – Bring your own data. More than 100 people have emailed various interesting (and often very difficult) problems. This week (between 16th of February to 20th of February), let’s take a look at some of these problems and solve them.

Consolidating data in different shapes

We can use either VBA or Excel’s consolidation features to combine data that has same shape (ie same number & type of columns). Here is one way to do it.

But what if we need to consolidate data that is in different shapes?

Something like this:

consolidating-data-in-different-shapes-excel-problem

In such cases, we can use 3 powerful tools.

  1. Multiple Consolidation Ranges – Pivot Tables
  2. VBA
  3. Power Query

So let’s examine how to use these approaches to consolidate data in different shapes.

Multiple consolidation ranges – Pivot

The first approach involves using a hidden feature in Excel, called as multiple consolidation ranges.

  1. Let’s say your data is spread across multiple worksheet tabs
  2. Go to any tab and press ALT+D P (press D first, release the key, press P)
  3. This opens Insert Pivot dialog from Excel 2003 days

    Insert a multiple consolidation ranges - pivot table using Excel

  4. In the next screen, select “I will create page fields”
  5. In the step 3, select & add the ranges one at a time and click finish.
    How to set up multiple consolidation ranges in Excel - Pivot tables
  6. And your consolidation is done!

[Related: Introduction to Excel Pivot Tables]

Combining data in multiple shapes – Using VBA & Power Query

For these 2 methods, please watch below video.

(Click here to see this video on Chandoo.org youtube channel)

Download Example Workbook

Please click here to download the example workbook. It contains only the VBA solution. For pivot table solution, use the above steps. For Power Query solution, follow the video and create it on your Excel.

How do you consolidate such data?

My preference is to use VBA as consolidation tends to be a repetitive task (every month we need to consolidate) and it works in any version of Excel. That said, I also like the flexibility and diversity Power Query offers. You can do so much more than just consolidating with PQ.

What about you? Have you faced any such consolidation challenges in your work? How did you solve them? Please share your thoughts and solutions in the comments section.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

Leave a Reply