Monthly Pivot Tables In an Annual Report

0

I was given 12 tables of purchase orders (one for each month) that my school has made and was asked to create an annual report listing purchases for each month which is pretty simple.

The thing is that they would like a spreadsheet that can input monthly data for the next fiscal year going forward (since I will no longer be working with them soon).

Each entry consists of Purchase Date, Supplier Name, Item Name, Total Cost. So for example, 1/1/2015, Dell Computers, Inspiron 11 3000, $449.99

What I've done is created 12 tabs and labeled them each with their own individual months where they can manually just paste the purchase orders and a Summary tab will display all the data from these 12 tabs.

  1. Is there a way to have a premade 'PivotTable1' generate a table for whatever information is pasted in tab 'January'?

  2. After having each month's data in a pivot table, in my Summary tab, the first column is all the Suppliers (Such as Dell, Acer, Starbucks, etc)

Lets say in February someone decided to purchase from Apple Inc for the first time, how would I reflect that in my Summary tab with a new Supplier?

My original strategy was the paste the preexisting Suppliers in the Summary table and use the Match function to appropriately sort the purchases into their appropriate rows. With this situation I would need another way to dynamically generate the Suppliers column.

(I'm not scared of using vba but I am a beginner at it)

Andy Wong

Posted 2015-05-19T15:23:27.637

Reputation: 1

Is it possible to have all of the purchase data for an entire year in a single table? Think of your spreadsheet in terms of database normalization. – Jason Aller – 2015-05-19T15:50:45.210

I agree with @JasonAller: don't create a tab for each month. Instead add a column to 1 table which indicates the month. Now you can filter by month easily and create a single Pivot Table. If you really need all the tabs, you can 1) use a Table as the Data Source so that it expands automatically with new data and 2) this really depends on the end goal. It's possible to use formulas to get a list of unique items (see #2) if you already have all the suppliers in a column from Pivot Tabels

– Byron Wall – 2015-05-19T16:30:02.997

Would it be possible to have a pivot table constantly update as I add on Purchase Orders? – Andy Wong – 2015-05-19T16:45:39.870

Answers

0

The Pivot Table can be refreshed by right-clicking it and clicking 'Refresh' (or Options > Refresh). Note though that if the input data becomes any larger than the original data, it won't pick up the additional columns and rows. It'd be good practice to generate the pivot table off more rows than you need initially and instruct the next user to not exceed the paste area (shade it in some color).

If more rows and columns are needed, the next user can use Option > Change Data Source or insert more columns and rows within the data-dump area before pasting in the data.

For a dynamic supplier list, the best and easiest solution would be to take advantage of the dynamic rows in a Pivot Table by pasting all 12 months of data in a single sheet and creating the Pivot Table off that (as noted in the comments). If you're absolutely wedded to using 12 sheets, then you could either record (then edit for generalization) a macro that copies the suppliers from all 12 sheets and removes duplicates (Data > Remove Duplicates) or have a formula that reads every supplier into the Summary sheet + another formula that generates an identifier + another table with the identifiers that reads off the supplier names. But really, the single-sheet approach is best as other approaches would just be workarounds to implement a functionality that already exists just by making a minor change to how your data is stored.

selwyth

Posted 2015-05-19T15:23:27.637

Reputation: 126