VBA Serenity

Share

Facebook
Twitter
LinkedIn

Greetings and salutations, my fellow VBA-fearin’ congregation. Evangelizin’ Jeff here, spreading the good word about everlastin’ VBA serenity. You may remember me from mah preeeevious sermons such as Tables, PivotTables, and Macros: music to your ears and Big trouble in little spreadsheet. Well today, I’m going to praise the work of a high-yah pow-wah.

Jon Peltier monkOur most pious Brother Jon Peltier (who’s fine presence is to mah left) broke his vow of silence over at the PeltierTech monastery to make a most inspirin’ observation during his recent confession Highlight a Specific Data Label in an Excel Chart:

Because I’ve been doing a lot of coding lately, my first thought was an approach using VBA. Then of course I came to my senses, and worked out a non-programmatic approach.

If possible, it’s usually advantageous not to rely on VBA for such tasks.

Hallelujah, brother!

My visionary brother is right: if there’s one rule of VBA that you should religiously observe, it’s to let the application be the application, where ee-fishin’ tah do so. A whiles back, I jokingly spoke it alike this:

The serenity prayer for Excel:
Lord grant me the VBA skills to automate the things I cannot easily change; the knowledge to leverage fully off the inbuilt features that I can; and the wisdom to know the difference.

(And I particularly chuckled at Excel Ninja BobHC’s response: You been on them tablets again.)

This sentiment is echoed in the commandments given us in Professional Excel Development (written by those latter-day-saints Bovey, Wallentin, Bullen, and Green):

Chandoo_VBA Serenity_PED2

This Good Book evangelizes that Excel developers “…shalt be divided into five different categories”:

  1. Basic Excel users, whom generally use Excel for fairly simple tasks, but as their exposure to Excel grows, so does the complexity of their worksheets and use of complex worksheet functions, PivotTables, and Charts.
  2. Power Users, whom have a broad understanding of Excel’s functionality, and occasionally use snippets of VBA from the Net or via the Macro Recorder, but their code tends to be messy, slow, and hard to maintain.
  3. VBA Developers, whom make extensive use of VBA – perhaps too much…to the point that they tend to use VBA to tackle practically every problem.
  4. Excel Developers, whom realize that the most efficient and maintainable applications are those that make the most of Excel’s built-in functionality, augmented by VBA where appropriate.
  5. Professional Excel Developers, whom know more languages than your typical Babel Fish.

That leap from VBA developer to Excel developer is worth striving for. (Don’t bother striving to be a Professional Excel Developer…they are so nerdy that they get about as many dates as your typical cloistered monk or nun). Unfortunately gaining the wisdom to jump from that third class to the forth one ain’t easy, and dedicated sermons on this matter are few and veryfar between.

Far too often the likes of yours truly are often so focused on leading you not into temptation and instead down a righteous path, that we simply never take the flock anywhere near enough to temptation so that we might cautiously peer at it from a safe distance and say in our most solemn and hushed tone “That way surely leads to hellfire, damnation, and eternal recalculation”. No siree, I’m afraid we usually opt instead to simply get the flock away from there.

However, help is at hand, sinners. Forums such as our very own Chandoo.org/forum are a great place to get guidance on such spirited matters…particularly if you ask the right question, such as “What is the best way to achieve X using Excel version Y”. But you’ll need to ask an open question based around what you are trying to accomplish, rather than being overly focused on how you are trying to accomplish it.

For instance, if you ask “How can I efficiently achieve X with VBA then that is all you will get…answers about the most efficient way to do it within the confines of the particular tool you have specified. Which will often not be the most efficient way. In fact, I’ve lost count of the number of times where someone has asked for a formula or VBA solution to some devilishly complicated problem – and got something devilishly complicated formula or code as a result – when a mere PivotTable would have sufficed. Or when some very simple Structured Query Language (SQL) via the in-built (but antiquated) Microsoft Query interface would have nailed it.

[Aside: SQL is basically a database language use to perform the database equivalent of lookups and to crunch numbers, or to conditionally join large datasets based on multiple complex conditions. SQL can be directly leveraged by Excel with minimal programming. Heck, you can use SQL to do stuff with NO programming whatsoever via Microsoft Query – a handy (if ancient) little interface bundled into Excel that will look familiar to any Access users. For an excellent Excel-centric introduction to SQL, read Craig Hatmaker’s amazing Beyond Excel: VBA and Database Manipulation blog. Chandoo also has a great guest post by Vijay – Using Excel As Your Database – on this subject. Ignore all the naysayers and unbelievers in the comments who say “Excel shalt not be used a database” for they know not what the point is. Which is that yea Excel doeth speak in SQL tongues at a pinch, and SQL is pure salvation when it comes to manipulating data, be it Big Data, Small Data, or Somewhere-In-Between data.]

Not to mention the miracles even a layperson can perform if they have the almighty Excel 2010 and PowerPivot installed. Or Excel 2013’s Data Model, which lets you mash up data from Excel Tables and serve them up directly as PivotTables with not a VLOOKUP or Macro in sight.

The end of Excel ain’t nigh…

Every release, Excel gets stronger and stronger. Excel 2010 offered us sinners significant improvements over previous versions…giving us things like Slicers and the free PowerPivot add-in. Excel 2013 takes a giant leap forward in allowing us to leverage off of inbuilt functionality to do things that we would otherwise require tons of complex code and complex formulas to achieve. Had Excel 2013 been launched 10 years ago, I simply wouldn’t need to have been a-preaching VBA and SQL to as many unbelievers as I have. If we keep abreast of these changes, then as the functionality of Excel ramps ever up, our code can ramp down accordingly.

The bottom line here is this: if thou strive to be a really good Excel developer then thou best get to know what’s behind just about every nook and cranny of the Excel application itself. Particularly the newly prophesied ones (yea the power of PowerPivot compels you,according to that dark preacher Mike Alexander). So go and explore all those mysterious things on the ribbon. You don’t have to master all of them…but it sure does help if you have an inkling of what they all do. Not just the obvious things like Tables and PivotTables, but the more mysterious ones like Slicers, Data Validation, and What-If-Analyis. And also the completely hidden ones like Goto Special. Not only do all those things do things natively that would require many Shekels of VBA code to replicate, but most are completely addressable from VBA to boot. Meaning an Excel Developer can simply say “Excel – do that thing with this data“.

Before you try to bend Excel to your complete command, study it well. No matter how much you want to jump right in tinker with Excel’s very soul, don’t discount what’s effectively printed on the outside of the box. If you do, you’re just another lazy devil writing hellish code.
Chandoo_VBA Serenity_Devil Ain't Easy

Feel free to leave your own theological questions and musings in the confessional box below. Unless it’s to say that you don’t like Pokey LaFarge. Keep that to yourself. Because I love ’em. Saw them live in Wellington a couple of weeks back. Definitely worth checking out if they come to a town near you.

Chandoo_VBA Serenity_Good lord giveth

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.

29 Responses to “Customer Service Dashboard using Excel [Dashword Week]”

  1. Tom Quist says:

    Looks good, Mara. Keep up the good work!

  2. William Solera says:

    Thx Mara, your work is great, congratulations...

  3. Francis Chin says:

    wow ! Great stuff Mara !!
    I am amazed on the work you did !

    What I like about your dashboard
    1. The first impression is the colors used. Very smart use of colors that matches each other, easy on the eye - make people wants to find out more !

    2. Clear message shown for the tweetboard for Quick overview on the state of situation.

    3. Use of creative titles for your charts "Information Desk".

    4. Clear and uncluttered charts. Gives reader a clear perspective with good use of charts colors too.

    5. Good use of Legend to describe what color meant "Highest Sales out of the three months"

    6. Of course, good use of Check boxes and Slider bar to offer interactiveness on your charts.

    Suggestions
    1. You may want to consider formatting your Y and X axis labels to show thousands, in $500K format instead of $500,000, so you can even made your chart look much neater.

    2. Budget Variant Chart - This one is special...I took a second look and try to understand it. I am not sure if this is the best chart to visualize Sales VS Budget and Variances. And the Variance of 16.19% is positive, so u may want to use conditional formatting to make it green color, red if negative.

    Overall is Great Work and Great Effort !!! Keep it up and I am so proud of you !

    Francis Chin
    http://www.francischin.com

  4. Sabrina says:

    Great Work Maya, just wondering if "5" Scrollable list of various gift shop items, can compare the previous 2 and current month selected in the above picklist, just one more suggestion if we can use top 5 gift category by using donut and bar mix chart to show sales mix for different months

  5. Sabrina says:

    Chandoo I would like to thank you for posting such helpful tricks for creating dashboards, I have learned a lot from your KPI Dashboard demo, I have created one dashboard to compare performce of Sales Associates, thaks a lot again

  6. Fred says:

    Thanks for the idea! Great job! You are giving me a lot of inspiratons!

  7. Mara says:

    Thanks everyone for the nice comments. I'm such a novice at this so I was so grateful for Chandoo's class and for everyone who submits ideas on his blog.

    Francis: Thanks so much for your comments. You're an inspiration. For the budget variance chart, I actually got that idea from one of Chandoo's post on budget vs actual. There was one that was simple and easy to read so I learned how to do that and made it dynamic. I'm open to any other ideas you have for budget vs actual. I'm always looking for ways to improve.

    Sabrina: Thank you for you for your suggestion on the top 5.

  8. Bhushan Sabbani says:

    Dear Mara,

    Great work.

    But i one suggestion regarding the INFORMATION DESK graph is consist of month but which year it belong is not there if it would be there it would be great.

    Warm Regards
    Bhushan Sabbani
    +91 98208 26012

  9. Avni says:

    Thanks for this idea... Great Stuff !!

  10. Ravi Kiran says:

    Excellent dashboard Mara.
    The best I like about the dashboard is the choice of colors. They are cool and not distracting. Thanks for sharing the file.

    @Chandoo
    Thanks for the dashboard week Chandoo. I am learnt a lot in the last 2 days. I am excited over the next 3 days! 🙂

    Regards,
    Ravi.

  11. VIO67 says:

    Great work Mara ! Thanks for sharing .

  12. goa homestay says:

    Mara, I liked the line, "Need to be more helpful." Our government needs to print this line, laminate it and post it in all government offices for the staff to see.

  13. Darshan says:

    Hi there, i have been recently visiting this blog it is really great, the best one for Excel, wish Chandoo great success ahead.

    I have one query, if you protect the data sheet the chart with the checkbox gives and error saying the data is protected and cannot be modified, is there a way around. This is cause if we want to publish this to someone who should only see it and do no changes to the data, is it possible please guide.

    This could be a silly but bear me i am novice to excel 🙂

    Thanks.

  14. praveen says:

    nice work.

  15. praveen says:

    inspired me a lot, working on few dashboard projects...

  16. Jay says:

    dear mara
    looks great .any reason why you have not used the bullet chart for the actual vs target chart.on the whole it is simple and elegant .jay.

  17. Gautam says:

    Dear Chandoo,

    The word Dashboard in the heading is misspelt.

  18. Krrish says:

    Wow. Very Nice work Mara. Next week I am going to take the Course, I will try to post my work here.

    Thank you so much for your helpful blog. Always appreciated your tips and tricks.

    I am proud that you belongs to our Vizag City.

  19. Krrish says:

    The above comment, I forgot mentioned about Chandoo, those two paras is about Chandoo. 😀

  20. Azucena says:

    Thank you Mara!

  21. vishal says:

    Thx Mara, your work is great, congratulations…

  22. Nalini says:

    Great Work Mara!!!!!!!!!!!!!!!!!!!!!!!!!!

  23. Aayush says:

    Hi Chandoo,
     
    I had been following your blogs for tips and tricks on excel. I am working with Media agency and we collect the data. Now this data has several parameters based on several legends. For eg Class A - legend color red, classB - legend color green and so on. Class A has several characteristics and parameters and heading etc. Now everytime we gather data and make pivot then based on the data in the pilot tables - top 10 we need to insert those in charts manually and also need to change the colors of legends and also. We create nearly 300 slides every month sector wise and it takes nearly our 4-5 days in doing that. Do you have any sample dashboard which will be helpfull to us and we can create it in a day.

  24. Gowravan says:

    Thanks really amazing one,

    it helped me in desgining OTACE report

    Regards
    Gowravan M
    9980651792

  25. mukhtar says:

    Awesome Job done here .............

  26. Samuel Amankwah says:

    very good master piece but wont to know if you can design KPI's for a financial institution. Thank you

  27. tajdeed pharma says:

    I need help to make performance for our company

    we have about 10 products from 5 years old

Leave a Reply