Dynamic Dashboard in Excel – Pulling it all together [Part 4 of 4]

Share

Facebook
Twitter
LinkedIn

Dynamic Dashboard in Excel - Part 4 of 4This is a guest post by Myles Arnott from Clarity Consultancy Services – UK.

In this the final post we are going to pull it all together to create our final Dynamic Dashboard model.

The dynamic dashboard VBA example can be downloaded here [Mirror]

Firstly a quick recap of what we have covered so far:

  • How to structure a workbook with user friendly front page and user notes
  • Using a structured inputs or driver page
  • How to create a range of dynamic charts
  • Some simple VBA to move items around a page based on the user’s parameters

Ok, so lets get to work to combine all of the above into a workable model. There is a lot to cover here so as Chandoo often says, may be time to grab a coffee!

First things first you need to bring all of the charts that you want to have in your dashboard into the spreadsheet and label up the tabs accordingly.

Homepage

I find that for a model that has multiple tabs a homepage allows any user to easily understand the contents and easily navigate to the page they are interested in.

Obviously you can make the homepage look entirely how you want. I use this design as my standard layout with a relevant title, business logo and contents structured to suit the model.

I use the free form shape to draw my boxes. This can be a bit fiddly to achieve but I think that the end result is worth the effort.

Using Freeform shapes in Dashboard

Links are achieved by inserting hyperlinks. I choose to reformat these to change the color and remove the underlining. [related: create a table of contents sheet in excel]

Hyperlinks - Creating an index page in Excel Dashboard

The help sheet is courtesy of John Walkenbach. Of all of the possible user note solutions I have encountered this to me offers the simplest and most user friendly approach. I use this in all the models that I develop for clients.

Now on to the central point of the model: The Dynamic Dashboard

There are three key parts to the dashboard, the driver area, the report area and the chart location matrix.

Driver area

This is the user interface which allows the user to hide, view or position a particular chart.
Driver Area - Dynamic Dashboard
Each title is hyperlinked to the page containing the chart in question. Each location cell is a named range with data validation to control the inputs. I have also added an input message via the data validation function.

The named range relates to the chart eg: Chart one is CH_1, chart 2 is CH_2 etc.

The validation list is based on a named range Position_Range (in the Inputs tab)
Data Validation settings - Dynamic Dashboard
The input message is defined in the Input message tab within the validation function menu.

Report area

This is your dashboard, the area to contain your charts. It is simply an area defined and formatted to be the container for the dashboard charts that the user chooses.

The Chart Location Matrix

The entries for this matrix are made in the inputs tab and pull through to the dynamic dashboard tab. Each cell of the matrix in the dynamic dashboard tab is a named range. These named ranges are referenced in the VBA. I will discuss this later in the post.
Chart Location Matrix - Dynamic Dashboard in Excel
This matrix defines where each chart will be placed. Getting these positioning references correct takes a little bit of trial and error but is pretty simple to achieve.

Now onto the images themselves. The images that the model moves around are pictures of the charts in each tab. This is achieved using the camera tool. Chandoo has written an excellent post on the camera tool so I will not repeat that here.

I have then renamed the images by selecting the image and changing the name in the name box.

As you can see the chart below is called Chart4. You will also notice that in the formula bar it refers to =’CH4′!$B$2:$F$17. This is the image that it has taken from the CH4 tab.
Using Camera Tool - dynamic dashboard in excel

The final step is to add a hyperlink back to the chart page so that the user can navigate to the relevant page by clicking on the image.

So now we have a structured model, images of our charts and everything in place to put in the VBA.

The VBA

The basics for the VBA were covered in part 3 – VBA behind the Dynamic Dashboard a simple example.

Location

Unlike in part 3, as we would like to avoid clicking on a button every time we want to update the layout, the VBA is located in the Dynamic Dashboard sheet itself rather than in a module.
Project Explorer area

The event target

It important to restrict the event function to specific cells. This stops the macro running completely every time any cell is changed in the sheet. In this case I have restricted it to the cells where the user chooses the chart’s position.

Variables

We need to define the variable in the VBA so that Excel knows where to put the images we have moved.

To do this we firstly define the variables and then link them to the named ranges in the chart location matrix.

To manage the loop code I have also used “I” as the current iteration and “ix” as the last desired iteration.

Moving the charts

This is based on the VBA used in part three of the post.

Loop

To avoid having to rewrite the code for each chart we instead use a loop that continues to loop as long as the current iteration “I” is less than the last desired iteration “ix”. I.e. loop for the eight charts and then stop.

The variable “I” is also passed to the position part of the VBA to select the relevant image to move:

ActiveSheet.Shapes(“chart” & i).Select

Ok So here is the full code:

Private Sub Worksheet_Change(ByVal Target As Range)If Not Intersect(Target, Range(“C7,C8,C9,C10,F7,F8,F9,F10”)) Is Nothing Then

Dim Topleft_T As Integer
Dim Topleft_L As Integer
Dim MiddleLeft_T As Integer
Dim MiddleLeft_L As Integer
Dim BottomLeft_T As Integer
Dim BottomLeft_L As Integer
Dim Topright_T As Integer
Dim Topright_L As Integer
Dim Middleright_T As Integer
Dim Middleright_L As Integer
Dim Bottomright_T As Integer
Dim Bottomright_L As Integer
Dim Hide_T As Integer
Dim Hide_L As Integer
Dim View_T As Integer
Dim View_L As Integer
Dim i As Integer
Dim ix As Integer

‘Define the position values (based on named ranges)

Topleft_T = Range(“Top_Left_T”).Value
Topleft_L = Range(“Top_Left_L”).Value
MiddleLeft_T = Range(“Middle_left_T”).Value
MiddleLeft_L = Range(“Middle_left_L”).Value
BottomLeft_T = Range(“Bottom_left_T”).Value
BottomLeft_L = Range(“Bottom_left_L”).Value
Topright_T = Range(“Top_right_T”).Value
Topright_L = Range(“Top_right_L”).Value
Middleright_T = Range(“Middle_right_T”).Value
Middleright_L = Range(“Middle_right_L”).Value
Bottomright_T = Range(“Bottom_right_T”).Value
Bottomright_L = Range(“Bottom_right_L”).Value
View_T = Range(“View_T”).Value
View_L = Range(“View_L”).Value
Hide_T = Range(“Hide_T”).Value
Hide_L = Range(“Hide_L”).Value

‘Set ix to be the number of charts
ix = 8

‘reset i
i = 1

”Select the shape and position it
Do While i <= ix

ActiveSheet.Shapes(“chart” & i).Select
If UCase(Range(“CH_” & i).Value) = “TOP LEFT” Then
Selection.ShapeRange.Top = Topleft_T
Selection.ShapeRange.Left = Topleft_L
ElseIf UCase(Range(“CH_” & i).Value) = “MIDDLE LEFT” Then
Selection.ShapeRange.Top = MiddleLeft_T
Selection.ShapeRange.Left = MiddleLeft_L
ElseIf UCase(Range(“CH_” & i).Value) = “BOTTOM LEFT” Then
Selection.ShapeRange.Top = BottomLeft_T
Selection.ShapeRange.Left = BottomLeft_L
ElseIf UCase(Range(“CH_” & i).Value) = “TOP RIGHT” Then
Selection.ShapeRange.Top = Topright_T
Selection.ShapeRange.Left = Topright_L
ElseIf UCase(Range(“CH_” & i).Value) = “MIDDLE RIGHT” Then
Selection.ShapeRange.Top = Middleright_T
Selection.ShapeRange.Left = Middleright_L
ElseIf UCase(Range(“CH_” & i).Value) = “BOTTOM RIGHT” Then
Selection.ShapeRange.Top = Bottomright_T
Selection.ShapeRange.Left = Bottomright_L
ElseIf UCase(Range(“CH_” & i).Value) = “VIEW” Then
Selection.ShapeRange.Top = View_T
Selection.ShapeRange.Left = View_L
ElseIf UCase(Range(“CH_” & i).Value) = “HIDE” Then
Selection.ShapeRange.Top = Hide_T
Selection.ShapeRange.Left = Hide_L
End If

i = i + 1

Loop

End If

End Sub

Closing Thoughts

We now have a model that provides pertinent summary information to aid management decision making. It combines a high level of flexibility within each report and then allows the user to choose which reports to include and where to position them. This allows an enormous amount of flexibility over the message to be communicated.

I hope you enjoyed the post and please feel free to make comments and suggestions on the model.

Finally a huge thank you for Chandoo for agreeing to host this post for me.

Download the complete dashboard

Go ahead and download the dashboard excel file. The dynamic dashboard can be downloaded here [mirror, ZIP Version]

It works on Excel 2007 and above. You need to enable macros and links to make it work.

Added by Chandoo:

Myles has taken various important concepts like Microcharts, form controls, macros, camera snapshot, formulas etc and combined all these to create a truly outstanding dashboard. I am honored to feature his ideas and implementation here on PHD. I have learned several valuable tricks while exploring his dashboard. I am sure you would too.

If you like this tutorial please say thanks to Myles.

Related Material & Resources

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.

70 Responses to “10 Tips to Make Better and Boss-proof Excel Spreadsheets”

  1. Yogesh Gupta says:

    Proper print settings on each sheet helps your boss to print the reports quickly without hastling you after printing irrelevant stuff.

    It is highly relevant that you print your reports once before circulating it to your boss or other people.

    Knowing that what your boss actully look at in the entire report can be very usefull. You can build a good summary of what your boss wants and put that as separate tab in the form of dashbord report, so that your boss does not peep into rest of your work and start pocking you with irrelevant stuff.

    You can also put that Dashboard into the email summary and not trouble your boss to open your workbook. This is ultimate boss proof tip and I have been using this for long time now.

  2. Shuchi says:

    Thank you Chandoo. Great checklist to follow before delivering an excel spreadsheet to someone else. Some points you mention are seemingly so simple that we might overlook them - like selecting cell#A1, but they make a difference to the impression the spreadsheet creates at the recipient's end.

  3. Tom says:

    Dear Chandoo,
    Great tricks.

    One trick I use (more and more) is to hide the sheet tabs and to hide the formulabar via the 'tools' 'options' and the 'view'-tab.

    Another trick is to limiting the scrolling area to hide all columms (or rows) until the end of the sheet. Select the column, press CTRL+SHIFT+RIGHT, right-click on the column and hide (also possible via VBA).

    I was wondering though if 'boss-proof' is related to 'excel-stupid-proof'?
    Cheerio
    Tom

  4. Martin says:

    Absolutely agree with this post !!!

    on the past months, after reading this blog, PTS's and Debra's Contextures, one of the things I've beggining to do as a best practice is to create all my spreadsheets with 3 tabs: data, summary and control, and this last one generally xlveryhidden, and sometimes the data one hidden as well.

    And this restrictions are also being applied as best practice, and with a lot of benefits as you well mentioned. Furthermore, if combined with dynamic named ranges, formulae is more readable to users, and the WOW effect is often achieved when the question "How did you do that?" arises.....

    Keep on the good posts !!!

    Rgds,

    Martin

  5. Nilesh says:

    Is there a way to keep the data in a seperate file rather than the same excel. This way you could keep presentation and data separate. But not sure how you would link up the two excel files

    • Pieter says:

      Yes, there is a way but it is not prefered.
      I used this a coulple of times, (You need to code).

      mail me if you need assistance with some sort

    • T says:

      It entirely is possible. The problem comes though, when you share the spreadsheet.

      If the recipient doesn't have both files, or access to both, things break when the values try to refresh.

  6. bazlina says:

    ey, why is the boss a she??

  7. Karthik says:

    Chandoo, one more trick that we could use with the help of VBA, RT click on the View code of the particular sheet, in the properties table set the Visible status to 2-xlveryhidden, this ensures the sheet name does not show up even when the BOSS tries to unhide the sheet from the sheet >> unhide option. Dont forget to password protect the VBA (available under tools >> VBAProject properties.

  8. Eric Lind says:

    Very good tips, although I have to say Chandoo, that your cats probably need to be spayed or neutered if they behave like that. =)

  9. Good to see all these tips on a single "sheet", and giving the name *boss proof*, and Dilbert was a great welcome 😀

  10. Peter H says:

    The best way to "Boss Proof" (and "Self Proof"!!) a spreadsheet is to keep back ups. I use a macro that saves the last 3 significant versions of the spreadsheet all with a date stamp included in the file name.

  11. To quickly select cell A1 on all sheet, use CTRL-Page UP or CTRL-Page down to navigate between sheets and CTRL-Home to select cell A1 (if you have frozen pane, it will select the top left cell of the section below).

  12. Jorge Camoes says:

    Great list. And I follow every single item... I also use a consistent background color for input cells in every report/dashboard. And I use a little VBA to identify the user and change the report accordingly (selecting the right market, for example).

  13. Tim Buckingham says:

    Chandoo, Nice post. I like to use the hidden Paste Picture Link option. Keep the original report you want displayed on a hidden sheet and only show the boss the report picture. Also great to watch the confusion when boss trying to select cells is worth the effort!

  14. m-b says:

    I usually save as PDF if there's no interactivity in the report. That way nothing can go wrong 🙂

    • Janet says:

      PDFs work a dream for me too and saves the boss's EA from telling me all the time that she can't print my work!!

  15. Chandoo says:

    @All.. thanks a ton for sharing your ideas. I am thinking of writing a part 2 of this post explaining some of your ideas in detail.

    @Bazlina ... I will make sure the boss is a HE in the next post 🙂

  16. Hui... says:

    "10 Tips to Make Better and Boss-proof Excel Spreadsheets"...
    Unless of course your Boss reads PHD !

  17. Debra McLaren says:

    Great article with one glaring error.

    If (like me) the majority of your spreadsheet errors are *caused* by cats, adding more cats is just going to increase the problem.

  18. Chandoo says:

    @Hui you always have a boss, even if you are boss. If you dont have a boss, then may be a cat or even a dog.

    @Debra: hmm... Are you sure the cats are not after the mouse? Go learn some keyboard shortcuts.. now 😛

  19. Paul Grenier says:

    Great Web Site. I've done almost all the above in trying to build my application and it's taken me hours and hours reading my "dummies " book. Thank you for all this information.
    Is there a formula I can use that will automatically return to "A1" cell should an associate use the 10 page spreadsheet I have?
    Is there a way to set an expiration date on my workbook so that beynd that date no one will get beyond the cover page?

    • Russell Cooney says:

      Paul, in all my "user facing" workbooks (those that I distribute) I create a named range called "Home" on the worksheet(s) that are most likely to be used. Then I write a little VBA that selects the Home range whenever that worksheet is activated or on other triggers depending on the context of the sheet. This is more appropriate for the dashboard tabs or summary tabs my job requires.

      But I usually set this functionality up early on in the design process so I can take advantage of it as well. I will sometimes assign a keystroke to the GoHome macro.

  20. JimmyG says:

    I'm in the marketing department (aka the picture department) and have to say that the macros/Excel sheets from our controlling department are the worst! They come to me to sort out the mess!!

  21. Chandoo says:

    @Peter: You can try creating a table of contents and then place it on each and every sheet so that user can jump to anywhere from anywhere. Here is a tutorial to help you get started.

    Also, You can prevent users from accessing the workbook after a certain date using macros. But users can certainly by pass it by disallowing macros on that workbook.

    @Jimmy: Wow... (just kidding) Welcome 🙂

  22. Ryan says:

    I was recently given a spreadsheet to improve upon.
    One of the "boss-proof" actions that the previous author had used was to use data validation instead of protecting the sheet to ward off people changing formulas.
    After entering a formula or value into a cell, use data validation to only allow, in this spreadsheet, whole numbers between 9999999 to 99999999.
    It's a bit of a pain to actually correct stuff instead of just unprotecting a sheet, but for those that know how to unprotect a sheet, it's a definite way to keep them from fooling with formulas.

  23. Raja Srinivas says:

    Puchu,
    We would love to see "Print" in your links section.
    It helps us taking prints as neat as your posts 🙂

  24. Paul Grenier says:

    Chandoo,
    I've emailed you a couple of times looking for avenues I need to try to put my workbook on the Internet.
    I notice you use PremiumThemes for your Web Site...You must feel good about their service. Do you think PremiumThemes might be an option for me?
    Paul

  25. Anurag G says:

    Instead of :
    Now Right click and select “Hide” option.

    Shortcut can be used : Ctrl+0 (to hide)..

  26. danial says:

    sir i wanted to know,how to hide cells or tab without hiding rows and columns? PLZ TELL ME

  27. JunDR says:

    Hi Chandoo!

    Great tips! Im researching on an excel project now that you can create to "lighten" the size without sacrificing the data inside..
    We usually encounter problems with the data, excel file is shared, in a network folder.. and there are 11 people that enters their own productivity in each tab.. however, there comes a time (uncertain) where some of the data they enter either gets deleted or changes value.. could this be a file size problem? are there other ways to create this file that will decrease data inconsistencies?

    thanks!

  28. [...] Hide un-necessary rows to create clean looking workbooks (and 9 more tips) [...]

  29. [...] Presentation format: all spreadsheets, should be designed so that it is easy to follow the process flow and result. Almost every spreadsheet should be presentable and understandable to senior management without additional formatting or explanation. (tips: how to design boss-proof excel sheets) [...]

  30. [...] on Excel formatting here: How to make better excel sheets, Formatting [...]

  31. [...] on Excel formatting here: How to make better excel sheets, Formatting [...]

  32. [...] tips: Learn how to make better Excel sheets Spread some love,It makes you awesome! [...]

  33. Janet says:

    Save what you want the boss to see as a PDF.  Absolutely foolproof and no cats hurt in the process.

  34. malen says:

    I really enjoyed allot of the tips on here, especially the one on comments on cells. That will come in handy on allot of our projects. I would also like to share on on my little tricks. I am constantly working on several different reports with several different systems and in doing so I am constantly running in problems and my way out of them is simply calling <a href"http://www.reportingguru.com/"> Reporting Guru </a> and telling exactly what I'm going through and they can tell me exactly how to get out.

  35. The_Doctor says:

    One of the things I've found to boss proof my worksheets are a few simple VBA scripts to automatically protect the workbook/worksheets, and direct them to the "Quick Look" dashboard page, I hide all of the raw data sheets before saving.  The script looks like this:
    Private Sub Workbook_Open()

        Sheets("Summary").Protect Password:="password"
        Sheets("Labor Cost by Site").Protect Password:="password", AllowUsingPivotTables: =true
        Sheets("Labor Cost by month").Protect Password:="password"
        Sheets("Quick Look").Protect Password:="password"
        Sheets("Quick look").Activate
        ActiveWorkbook.Protect Password:="password", Structure:=True, Windows:=False
    End Sub

    I also have a pivot that contains labor cost data which cannot be refreshed while the worksheet is locked.

    Private Sub Worksheet_Activate()
        Sheets("labor cost by site").Unprotect Password = "password"
            Set pvttable = Worksheets("labor cost by site").Range("a1").PivotTable
                pvttable.RefreshTable
        Sheets("labor cost by site").Protect Password = "password", AllowUsingPivotTables:=True
    End Sub

  36. lol says:

    OPPAN GANGAM STYLE!
     

  37. Rahul thial says:

    Your post are always with something creative , thanks for sharing this information , your post are worth reading and implementing 🙂 great job

  38. apt says:

    Hi,

    I will try to learn every point slowly !

    Shokran Chandoo.

  39. SpreadSheetNinja says:

    Best boss Proofing of sheets is useing indirect(address 😛 this prevents most smartass bossess from doing any actual changes cus the formula will be long and hard to understand for any bystanders..

    Also putting the actual calculations on a different sheet can make a sheet bulletproof from bosses.. especialy if you put them in the Very hidden so when the boss learns how to unhide sheets he wont simply find them.

    One thing iv also learned is that most bosses is scared of macros that gives "virus" warnings before beeing run 😛 That include the default warning from Excel...

    Long formulas or work arounds is best way to go.

  40. Novice says:

    What's the best way to amalgamate two existing excel spreadsheets into one?

    Two teams use the same format spreadsheets with individual data split into calendar months and I want to make them one without manually entering the data.

  41. Isaac says:

    Changing the properties of the file to read-only . (While the file is closed, right click on the file and check the read-only box.)

    This allows my boss(es) to access the file -- even change it -- without being able to save their changes. If a boss likes his 'new' version, he can save it with a different file name.

    But now -- how to prevent the boss from deleting the file altogether? Or deleting the whole network?

    • pieter says:

      Hey man.
      Think you can go as easy as to make a shortcut that links to your read only document. Then the boss wont know of the root document. He can figure it out but lets face it. He is a boss and 70% if them wont know squat

  42. Matt says:

    Instead of "Hiding" rows & columns, I find "Grouping" works best as its very easy to quickly see if a worksheet has hidden rows/columns. Sometimes hiding a random row/column is not easily noticed and can create issues.

  43. samantha says:

    I have one xl sheet with different dates in many columns and one raw's. I want to send this data to another xl sheets for each date. if somebody can help me will be great.

  44. Mariateresa says:

    Hello, I have just found out that I made a mistake in my spreadsheet: I had a column of negative numbers, but one of them was positive (while it should have been negative). Is there a formula/system to avoid this?

    Thanks.

    Mariateresa

  45. Hi,

    Hiding any worksheet can be unhidden and messed around easily. I change the visibility in visual basic from -xlSheetVisible to -xlSheetVeryHidden. By this, even if you right click on sheets, you will be unable to find the hidden sheets.

    Cool? I think so...

  46. sandeep says:

    Very informative, Thanks

  47. Cedric says:

    Is there a way to lock cells in an already protected worksheet.
    (Thus the entire worksheet is protected, then the entire office can open it as read only but only a few users have the password to edit the file)
    I would like an additional password or prompt box so these few users don't accidentally change formulas.

  48. Itss such as you learn my thoughts! You appear too understand
    a lot abnout this, like you wrote thee e-book in it
    or something. I fel that you just could do with some percent to presseure the message house a little bit,
    but insatead off that, this iis wondeerful blog.
    An excellent read. I'll definitely be back.

  49. free movie says:

    It is in reality a nice and helpful piece of info.
    I am happy that you just shared this useful info with
    us. Please keep us up to date like this. Thank
    you for sharing.

  50. GraH says:

    I laughed out loud reading the 2nd solution about moving to marketing department and making ppts.
    I've been using "technical" sheets for a long time already and depending on the audience it is hidden or not. I'm currently in my NO VBA mindset, so the very hidden option is no longer. Using sheets names like: TechnicalCodes; ExplicitVariables;SetUp; HeavyCalc seem to work to my experience as they send along a message "Don' t you mess-up here, you fool!". A "Read This" section or sheet however does not work!
    Reading stuff on this site has helped me develop a good habit of using colors and themes to assist the end user in being well-behaved. In my book the best advise here, because it is about the user experience and not only about protection your own work.
    For dashboards I get rid of tabs and scroll bars. Besides 2 exceptions, I need to come across a manager who can turn them on again without my help.
    Seems that I forgot about protecting cells, sheets and workbooks altogether. Damn!

  51. Mark H says:

    Thanks for the informative article Chandoo, I've been struggling with Excel lately. It's a powerful tool, but hard to learn for me.

  52. Neeraj Singh says:

    Thanks Chandoo for sharing these excel sheet tips it helps me a lot to understand excel more.

  53. Bryan says:

    Nice roundup, Chandoo! Here's one more I thought would be relevant:

    For Excel 2013+, you can hide the ribbon, as shown in this animated gif: https://gridmaster.io/tips/hide-ribbon-excel-space

    This will simplify the interface, making it less likely for people to accidentally make changes. 🙂

  54. KUMAR says:

    THANK YOU SIR

  55. constantine la says:

    I'm better at Power BI thanks to you!

Leave a Reply