This article is written by Michael Hutchens from Best Practice Modelling.
In the first article on Modular Spreadsheet Development, we got a high level overview of Modular Spreadsheet Development principles. This article discusses the practical implementation of these principles in Excel.
A quick review
In my first article, I discussed the infinite potential provided by Modular Spreadsheet Development to improve the way spreadsheets are built, used, shared and communicated.
This is made possible by sub-dividing spreadsheets into modules, which can be re-used and linked like Lego® pieces, thereby reducing model build time and the risk of errors.

These concepts were well received by Chandoo’s readers, although some concerns were raised about their practical implementation in Microsoft Excel. This article aims to address those concerns.
Overview of implementation methods
From my experience using Modular Spreadsheet Development over the past decade, there are three increasingly-efficient methods of implementation in Microsoft Excel:
- Manual implementation;
- VBA automated implementation; and
- Commercial add-in implementation.
I will provide an overview of each of these methods and a summary of their advantages and disadvantages.
1. Manual Implementation
The key to implementing Modular Spreadsheet Development is standardization, because it is the robust consistency created by standardized spreadsheets that makes it possible to interchange the modules within a spreadsheet.
There are numerous approaches to spreadsheet standardization (my organization uses the Best Practice Spreadsheet Modeling Standards), but the key requirement of any standardized approach for Modular Spreadsheet Development purposes is consistency. Once this consistency is present, re-using and sharing modular content within spreadsheets becomes surprisingly easy.
Let’s consider an example ( ➡ download example files ) in which a model developer has built a dynamic 3-way financial statement model. This model contains various modules, ranging from revenues and expenses through to financial statements and a dashboard module that looks as follows:

After completing this model, the model developer decides to add an equity valuation. Creating the equity valuation assumptions and outputs from scratch is a big job, and a risky one given the complexity of the discounted cash flow (DCF) valuation formulas required.
Luckily, the model developer has included an equity valuation in a prior model, and had the foresight to keep a copy of this equity valuation module in a standalone workbook called Equity Valuation.xlsb. The composition of this module is shown below:

This equity valuation module contains four components; an assumptions component, a calculation outputs component, an outputs summary component and a lookups component (to hold drop down box control lookup data).
From an Excel perspective, this module is a workbook with these four components placed on three sheets; one assumptions sheet, one outputs sheet and one lookups sheet, as shown below (the lookups sheet is to the right of the image):

Each of these components is comprised of blocks of entire rows that contain Excel content (such as constants, formulas, controls, hyperlinks, etc.) that together undertake an equity valuation. For example, the top sections of the equity valuation assumptions component are shown below:

Rather than try to re-build all of this content into the financial model, the model developer decides to implement Modular Spreadsheet Development and insert this equity valuation module into the financial model.
Two steps are required to do this:
- Collectively copy the sheets containing the equity valuation module components into the financial model workbook from the workbook containing the equity valuation module; then
- Insert formulas into the equity module assumptions to link this module to the surrounding financial model outputs, and thereupon calculate the DCF equity valuation.
To copy the sheets containing the equity valuation module components into the financial model workbook, the following actions are required:
- Activate the Equity Valuation.xlsb workbook;
- Collectively select the three sheets containing the equity valuation module components (i.e. the sheets named Eq_Val_Ann_TA, Eq_Val_Ann_TO and Eq_Val_LU) and copy them to the end of the Financial Model.xlsb workbook using the Excel Move or Copy sheets command, as shown below:

- Click the OK button (or press/hold down the Enter key) each time you are asked to use the destination workbook version of a range name. This will happen quite a few times in this example, as range names have been used in the time series parts of the model to ensure consistency;
- Move the inserted sheets into their appropriate locations within the Financial Model.xlsb workbook – i.e. move the sheet containing the equity valuation assumptions into the assumptions section of the workbook, etc.; then
- Update any necessary surrounding content within the financial model workbook, such as the table of contents, to reflect the inclusion of these sheets.
After doing this, the newly-inserted equity valuation module needs to be linked to other modules within the financial model in order to correctly calculate the DCF equity valuation. This is a complex example, but for those familiar with DCF valuations, the following data must be linked into the equity valuation module:
- Cash flow available to equity;
- Tax paid;
- Earnings before interest, tax, depreciation and amortization (EBITDA); and
- Closing debt balances.
You can learn more about DCF valuation theory from the financial modelling resources on the Best Practice Modelling website.
After doing this, the financial model contains a DCF equity valuation, as shown below in the table of contents, which has been compacted to highlight the newly-added components:

Amazingly, this sophisticated equity valuation analysis was inserted into the financial model in minutes, with only a few formulas required to link it to the surrounding model outputs. As a result, assuming that the source equity valuation module has integrity, the model developer instantly has confidence that the new equity valuation in the financial model is also reliable and correct.
As demonstrated by these steps, the manual implementation of Modular Spreadsheet Development is somewhat fiddly, but it is possible as long as the content within all workbooks and module files is sufficiently standardized to support interchanging components.
The implementation steps used in this simple example can be used to insert any pre-existing module into an existing modular spreadsheet, thereby greatly reducing model development time, cost and risk.
2. VBA automated implementation
Excel users with intermediate to advanced VBA skills will probably have recognised while reading the manual implementation steps that VBA code can be written to automate to automate the majority of this process.
A full discussion and example VBA code is outside the scope of this article, but if you’re considering have a go at this here are some general tips:
- Use a user form containing list box control with its MultiSelect property set to fmMultiSelectMulti to allow users to select the sheets containing the module assumptions and outputs to be imported;
- Ensure that Application.DisplayAlerts is set to FALSE before running the code used to copy sheets to prevent prompts being displayed to users; and
- Use the VBA Range.Replace function to redirect formula links after moving the imported module assumptions and outputs onto existing sheets.
These steps were in fact the steps that I first took when developing an add-in for our organization to automate the insertion of modules. 10 years later, this add-in is called bpmModules, and I’ve provided an overview of it below.
3. Commercial add-in implementation
When I first started implementing Modular Spreadsheet Development, I did it manually. It was fiddly, but as my colleagues and I built more complex modules, it soon became much quicker than re-building content from scratch in each model.
In 2004 we started refining a basic Excel add-in to automate the insertion and deletion of modules, and this once again saved us a lot of time and reduced the risks involved in these processes. But three main issues still haunted us:
- Models often differed in term – e.g. one model might be 5 years long while the next might be 10 years long;
- Every model required a different number of categories – i.e. one might require 3 revenue categories while the next might require 20 revenue categories; and
- Manually entering and removing formula links between modules before deletion and after insertion was tedious and error-prone.
So we set out to build a comprehensive add-in to make Modular Spreadsheet Development quick and easy within Excel. We called it bpmModules, and thought it would take a couple of years to develop.
It ended up taking 10 years to develop, and only after we completed it did we realize that we’d effectively created a modular content creation, management and sharing system for Excel. It’s a mouthful, but that’s exactly what it is, and with it you can do things like:
- Create your own modules;
- Use and edit other people’s modules;
- Insert, delete and link modules;
- Automatically change the term of a model; and
- Automatically add and remove categories without manually editing formulas, etc.
bpmModules also allows you view and manage the modules within your spreadsheet via simple diagrammatic interfaces, such as the one below that shows all the modules in the underlying Excel workbook:

We’ve made the Lite version of this add-in free, and you can download thousands of free modules fromthe downloads section of BPM’s website. The software does become commercial once you start building larger models, but by this stage it is hopefully saving you enough time to justify the investment.
Comparison of approaches
Modular Spreadsheet Development is an awesome concept capable of revolutionising the way spreadsheets are created, managed and shared. Unfortunately, Excel is not by default modular, so to implement Modular Spreadsheet Development you will need to standardize your spreadsheets and then use one of the three implementation methods discussed in this article.
I’ve provided a summary of the advantages and disadvantages of each of these implementation methods below:
- Manual implementation is free but requires rigid standardization and is somewhat fiddly, thereby creating risks of errors when inserting modules into workbooks;
- VBA automated implementation is free and less fiddly then manual implementation, but still requires rigid standardization and at least intermediate VBA skills to develop a reliable Excel add-in; and
- Commercial add-in implementation is not free for larger models but provides an automated mechanism for creating, re-using and sharing modular content in Excel.
Each of these methods provides the core efficiency gains resulting from Modular Spreadsheet Development, so your choice depends largely on your existing Excel skills and the time, cost and risk savings you estimate you would achieve via automation.
Source files
Click here to download example workbooks [zip file].
The following workbooks can be used to replicate the manual Modular Spreadsheet Development example provided in this article, and consist of the financial model before and after the insertion of the equity valuation module, and the workbook containing this module:
- Financial Model.xlsb
- Equity Valuation Module.xlsb
- Financial Model (with Equity Valuation).xlsb
The following workbooks can be used to demonstrate the automation of this process using the bpmModules Excel add-in:
- Financial Model (bpmModules).xlsb
- Equity Valuation.bpm
- Financial Model (with Equity Valuation) (bpmModules).xlsb
Note that you will need to download and install a trial of bpmModules to insert the equity valuation module (with the file extension *.bpm) into the bpmModules-created financial model.
More information
You can watch a range of Modular Spreadsheet Development movie tutorials via the following link:
www.bestpracticemodelling.com/chandoo/msd
Download thousands of modular Excel workbook examples from:
www.bestpracticemodelling.com/downloads/excel_models
Download thousands of modules from:
www.bestpracticemodelling.com/downloads/modules
Watch bpmModules build a financial model in less than 1 minute
Added by Chandoo
Thanks Michael for writing these very detailed articles on Modular Spreadsheet Development to spread the awareness among our readers. With your help, I am sure many modeling professionals & analysts around the world can embark on the time-saving & fruitful journey of modular development.
If you enjoyed these articles, Please take a minute and say thanks to Micheal. Also please share your thoughts, implementation notes & experiences with us using comments.














49 Responses to “Interactive Pivot Table Calendar & Chart in Excel!”
Excellent post again from awesome chandoo.org
This is one of the post to evident, without using macros we can create excellent charts using available excel options.
Slicer is one of the useful option in excel 2010 .. excited to see more options in excel 2013.
Regards,
Saran
http://www.lostinexcel.blogspot.com
Nice one chandoo............... great work done.....
Cool article. Only downside was that I didn't see at first that I needed 2010. Guess I still have to wait awhile before getting to try this out myself.
I consider myself an Excel expert, but you constantly amaze me with posts like this. Fantastic calendar!
Good post, like this little trick!!
How to not show the value in the cell
format the cell to custom with the below
;;;
Could you add lists of holidays to be transferred to the calendar days?
Two lists would be needed: 1) for the holidays that stay fixed (eg, CHristmas), and 2) for the holidays that move around (eg, Thanksgiving).
Such lists would be prepared externally, and the program would transfer their information to the appropriate days.
Wow! This is something amazing. I am going to do some practicals with this and show a sales trend on this. As we have our sales plans weekly basis, this should impress by boss when put in dashboard. Cool.
And thanks1
Chandoo you have a knack of getting on to these great looking very creative ideas!
One thing with calendars I have seen before is not catering for able to enter notes or appointments or project milestones. But with this one it's easy enough to add the extra lines as you have done for the chart concept and link to this other type of info.
For 2003 we could replace slicers with a validation style dropdown couldn't we?
Chandoo, you are awesome;) i was using calender to show my reports, but i had made all months and then underneith date shows the value, man its really awesome . i am going to use this format for my reports.. only draw back for me is i am using 2007. hence no slicer.. may be have to modify with out slicer.
Why not use =weeknum() for the weeknum column?
Great tricks! I love trying to reproduce the charts myself to get the hang of 'em. This one was great.
My only issue is getting the VBA in the year object to refresh the data. I used the VBA provided at the link, and, I can see it in the Macros tab, but, when I click the spinner the data does not update. Any tips?
Thx!
3G
^^Ignore this! NOT ENOUGH COFFEE YET.
I forgot about the "Assign Macro" option
:-s
Just started at chandoo - this is great!
I opted to use the formula =IF(F6>F5,G5,G5+1) for my weeknum - worked for me (I didn't get all the way through the example, since I'm running Excel 2007 - so don't know if that'll affect anything later in the example). I'm open to comments on this alternative approach.
Thanks for creating this website!
VC (Excel student).
Very cool - but now I'm even more excited for the new time controls for Excel 2013!
Great calendar...
I wonder whether we can make a school calendar (Class, subjects, teachers) using this calendar, assuming the weekly plan is duplicated across the year.
I would love to be a part of creating a class schedule...I'm attempting to help a friend (gratis) to do just that - can you point me in the right direction or provide a sample of sorts?
[...] Wow – what do you think of the interactive calendar chart demo above? To achieve this impressive effect you must have Excel 2010 because it utilises slicers, which is a feature introduced in Excel 2010. Find out how this treasure was created on Chandoo’s page. [...]
Hello Chandoo,
Great works! I learn a lot from this website. Here is the problem I met when I follow your tutorial: once I run and save this cool pivot calendar chart , the size of excel file will increase every time. Could you let me know how to figure it out? Thank you for your time in advance.
An excel chart-fan from China.
I already figured it out.
wow, love the calendar, i'm a newbie, found this site and it's amazing.
Got it mostly figured out, but could do with help with your named range 'tblchosen'
I can build the pivots, link the calendars together but can't see how to use index(tblchosen...) to pull through the productivity figures
appreciate any help
thanks
Great. Miss the Today button. Will try and figure a way to add this to the file.
I want to start the week on Monday, not Sunday (MTWTFSS). Re-arranging the calendar tab works however, any month where the 1st is a Sunday starts on the second and totally omits Sun 1. I have been tinkerign for a while, but can't seem to figure this out.
Changing F2 on the 'Calcs' tab to 2 so that the week starts on Monday works.
Cutting & pasting Sunday on the 'Pivot Calendar' tab and moving all cells up 1 row works.
However, using April 2013 for example, you lose the 1st off of the pivot calendar so that the month starts on 2 April. What should happen is the first row should only show Sun 1 April and then the next row starts Mon 2 April. Still can't fugure out where the problem lies.
"Further Enhancements:
Adjust week start to Monday: Likewise, you can modify your formulas to adjust weekstart to Monday or any other day you fancy."
I have tinkered with this previously with no success, does anyone know which formulas require tinkering, I have only succeeded in breaking this in an effort start a week on a Monday.
[...] Interactivo Artículo original var dd_offset_from_content = 50; var dd_top_offset_from_content = 0; Tags: 2013, calendario, [...]
Completely off topic, but how do you create those animated pictures in your tutorials? It is not a movie (like the Youtube movie), so what software do you use to create such high quality "animated" pictires? Thanks
Jeroen
the animated pics are called Animated Gifs
they are made using Camtasia
Refer: http://chandoo.org/wp/about/what-we-use/
This is fairly easy to do just using calendar formulas, which would be quicker, and doesn't need VBA? Am I missing something?
[...] on how to generate an interactive calendar using pivot tables. Please check out Chandoo’s Interactive Pivot Table Calendar & Chart in Excel before reading this, as I want to go through how I used his method to adapt a calendar which was [...]
Great tip shared by you... howevr would appreciate if you could mention in your tricks about excel version. The example above would work only in excel 2010 and above I believe. Please help me if there is any way we can use the tip in excel 2007 as well..
Many Thanks,
Regards,
FK
Hi, I'm going to give this a shot, but one small question before I do. Can a linked cell be updated based on the date that is selected from the calendar? The calendar is really cool and this would make is especially good to use (and easy and fast).
Regards,
swissfish.
This post is awesome, and using your instructions, I was able to get this to work with a pivot table that pulls directly from a Project Server database. It was a bit complicated to get the day to sum correctly, but I managed to finagle it. I hope you don't mind if I link back to you when I post my instructions.
Thanks for giving me a starting point for this!
[...] http://chandoo.org/wp/2012/09/12/interactive-pivot-calendar/ [...]
This is great, and pretty much everything I was looking for.
However, I already have a large spreadsheet, and I want to include your worksheets in it. I copied all the worksheets and the Module 1, but I can't get it to work. What else do I need to transfer / update please?
Hello there, is it possible to use this pivot to produce a calendar style chart, with returns multiple data per date, which on the calendar then, when clicked links to the data to provide more background information? What do you think? I'd love if I could pivot when i need. thanks, m
Hi, did you ever figure out how to do this? I would love to find a way...
This is amazing and will work well for my calendar project! My question is, how can I expand the calendar to fit a standard sheet of paper?
Wow - this is so creative. I'm taking the basic idea and building a reservation calendar.
Question: How do you get the month and year slicers on a different page than the pivot tables? I'd like to have my final calendar on a separate page from the pivot.
[…] http://chandoo.org/wp/2012/09/12/interactive-pivot-calendar/ […]
This is perfect...is there a way to add notes/tasks to the individual days?
Excel will not let me insert blank rows between lines in the pivot table. I am use Excel 2013 - is there a pivot table tools command that must be used?
I can create the pivot table calender with a year spinner & month slicer but I do not see how to display the the attendance information that I have in the original data table.
Thank you for the wonderful post and I am sorry for my lack of understanding...
Excellent!
Please show me how to add an alternative calendar to this calendar, Chinese or lunar calendar (and by lunar I don't mean phases of the moon), like what they still use in Asia
Thanks
Christopher
[…] Wow – what do you think of the interactive calendar chart demo above? To achieve this impressive effect you must have Excel 2010 because it utilises slicers, which is a feature introduced in Excel 2010. Find out how this treasure was created on Chandoo’s page. […]
Hello my name is Maurice, excuse me for my further request, but believe me, without your help priprio not know how to solve this problem.
So: always using a chart positioned on an excel sheet I wanted to match each square (series) to a single cell, to create a perpetual calendar.
Now everything works fine; except that for a fact, and it is this: In the calendar as you well know some numbers may not be apparent until certain conditions, which I solved by writing this "= O code (AA5 = DATE ( $ H $ 1; MONTH ($ AD $ 12) +1; 1)) and the game and done.
Now I would like to achieve the same thing using the Chart; How can I do to make this happen! let me also just a practical example so that I can understand all the rest then I'll do; Thanks Greetings from A.Maurizio
Link Program : Link: https://app.box.com/s/lhqva3eji0xcf2nmk8lxyki88tt1mi5t
Great info, thanks for sharing
Hi,
I love your calendar however I am modifying it for use in displaying employee performance metrics on a day by day basis.
I see where tblChosen and tblDates are named ranges however I cannot find them anywhere.
Are they assigned to specific cells because I cannot tell.
I see both of them in the Name Manager, which tells me what they refer to but does not give a value or cell location.
@Mike
With the Names in the Name Manager
Simply select the name
Then click in the Refers To: box at the Bottom
Excel will take you to where the Named Range is referring to
[…] Wow – what do you think of the interactive calendar chart demo above? To achieve this impressive effect you must have Excel 2010 because it utilises slicers, which is a feature introduced in Excel 2010. Find out how this treasure was created on Chandoo’s page. […]
Hi, Chandoo
This Pivot Calendar is an excellent idea. I’ve done one for myself using your guidelines. I just need something I’m not being able to do. I need that when I open the file the default date is set to today’s date. I know how to do it with conditional formatting. But I think I’ll need some vba coding for this. Can you please help me with this. Thanks in advance