Forum Discussion

smwilson's avatar
smwilson
Copper Contributor
Apr 28, 2022

Create Pareto chart from multiple Excel workbooks

A bit of background - I work as a data analyst for a manufacturing company. We are starting daily safety inspection checklists (things like PPE use, proper chemical storage, etc) for each area of a plant (weld shop, paint, etc).

 

I have a workbook setup with tabs for Mon-Fri and a sixth tab which totals the daily counts based on different categories and then a Pareto chart is built from that.

 

Theoretically I would have one Excel file per week from each department at a given plant. How would I create a plant-wide chart which combines the totals from each department workbook? I'd prefer to use just formulas or something like Power Query and stay away from VBA or scripting. Any thoughts or links to a tutorial would be amazing.

4 Replies

    • smwilson's avatar
      smwilson
      Copper Contributor
      Interesting, I'll check out the link.

      I've never done much with macros or VBA which is why I'm a little hesitant to go that route (although I do other kinds of programming sometimes). Where would I start with that?
      • Patrick2788's avatar
        Patrick2788
        Silver Contributor
        The way I see it, you'd have two subroutines:
        1. Open multiple workbooks from a given folder. The code simply opens each workbook, performs the actions in macro #2, then closes the workbook.

        2. Locate the data to be extracted from each sheet of each workbook and then return it to your active workbook. This step can be fairly straightforward if there's consistency in where the data resides in each workbook.

Resources