fbpx
Search
Close this search box.

All articles with 'VBA' Tag

Conditionally Format Chart Backgrounds

Published on Mar 27, 2015 in Charts and Graphs, Excel Howtos, Huis, Posts by Hui, VBA Macros
Conditionally Format Chart Backgrounds

Learn two techniques to conditionally format the background of a chart based on some external value.

Continue »

Celebrate Holi with this colorful Excel file

Published on Mar 6, 2015 in Charts and Graphs, VBA Macros
Celebrate Holi with this colorful Excel file

Today is Holi, the festival of colors in India. It is a fun festival where people smear each other with colors, water balloons, tomatoes and sometimes rotten eggs. This year we wanted to play with only water guns, but kids vetoed that idea vehemently. So we ended up driving to my sister-in-law’s place to play with colors (there were no rotten eggs or tomatoes, thankfully).

Let me smear a few colors on you

I would love to splash a jug full of color water on you and say Happy Holi. But the internets have not advanced thus far. So I am going to give you the next best option.

An Excel workbook to play holi

Continue »

How to consolidate data that is different shapes [BYOD]

Published on Feb 16, 2015 in Excel Howtos, Pivot Tables & Charts, VBA Macros
How to consolidate data that is different shapes [BYOD]

Last week, I asked my email newsletter readers to submit “one data analysis problem you are struggling with”. We called it BYOD – Bring your own data. More than 100 people have emailed various interesting (and often very difficult) problems. This week (between 16th of February to 20th of February), let’s take a look at some of these problems and solve them.

Consolidating data in different shapes

We can use either VBA or Excel’s consolidation features to combine data that has same shape (ie same number & type of columns). Here is one way to do it.

But what if we need to consolidate data that is in different shapes?

Something like above.

In such cases, we can use 3 powerful tools.

  1. Multiple Consolidation Ranges – Pivot Tables
  2. VBA
  3. Power Query

So let’s examine how to use these approaches to consolidate data in different shapes.

Continue »

How to check for hard-coded values in Excel formulas?

Published on Jan 14, 2015 in VBA Macros
How to check for hard-coded values in Excel formulas?

Here is a common problem. Imagine you are looking a complex spreadsheet, aptly titled “Corporate Strategy 2020.xlsx” which as 17 tabs, umpteen formulas and unclean structure. Whoever designed it was in insane hurry. The workbook has formulas like this, =SUM(Budget!A2:A30, 3600)+7925 .

It was as if Homer Simpson created it while Peter Griffin oversaw the project.

So how do you go about detecting all cells containing formulas with hard-coded values?

Continue »

CP027: 15 proven strategies to be awesome in 2015

Published on Jan 8, 2015 in Chandoo.org Podcast Sessions
CP027: 15 proven strategies to be awesome in 2015

In the 27th session of Chandoo.org podcast, let’s pave way for an awesome 2015.

We are going to talk about 15 proven strategies for making you awesome in Excel & Your work.

What is in this session?

We all get fresh dose of energy, enthusiasm & drive during new years. So we aim for bigger & more awesome things. But once the first few weeks are over, we just settle down to the normal rhythm and forget about these big, hairy & audacious goals.

Let’s make 2015 different. In this podcast, Let’s understand how you can become awesome in Excel & your work this year, with 15 proven strategies:

  • Announcements – my new year & plans for next few months
  • Becoming awesome – 3 important areas of focus
  • Learning
    • New formulas
    • New features
    • Different charts
    • Macros
    • Linkup Excel with other software
    • Get a book
    • Join a course
  • Application
    • Take up a work project
    • Consulting
    • Mimic a chart in Excel
    • Beyond XL – Power Pivot etc.
  • Sharing
    • Forums
    • Helping a colleague
    • Comment on blogs
    • Train your team
Continue »

Compare 2 sets of data by letter or word & highlight mismatches [vba]

Published on Dec 15, 2014 in VBA Macros
Compare 2 sets of data by letter or word & highlight mismatches [vba]

We analysts like to compare. If you ever want to keep an analyst busy, just give her 2-3 options. She won’t return to your desk until the cows come home. My wife uses this trick all the time. Picture this:

[In late 2013]
Me: I want to buy a new phone
She: Do you want Nexus 5 or Galaxy S5 or iPhone 5s?

Its late 2014 and I am not done comparing.

So today, let’s talk about an interesting comparison scenario.

Comparing by letter or word

See above demo to understand the concept. Read more to learn how to do this.

Continue »

Calculate Pi by throwing Frozen Hotdogs !

Published on Nov 28, 2014 in Huis, Posts by Hui, simulation, VBA Macros
Calculate Pi by throwing Frozen Hotdogs !

Did you know you can Calculate Pi by throwing Frozen Hotdogs !
No ?
Learn how to calculate Pi by throwing Frozen Hotdogs with this Excel Simulation of Buffon’s Needle.

Continue »

Looking up when data won’t play nice – few more alternatives

Published on Nov 12, 2014 in Learn Excel, VBA Macros
Looking up when data won’t play nice – few more alternatives

Recently, we discussed about the case of unwieldy data and how we lookup what we want using formulas like SUMIFS. Today, let us learn few more ways to solve the same problem.

Suitable structure spawns simple solutions

Poorly structured is the 2nd biggest problem of analysts. The first one is not enough coffee. That is why there is a dictum in the data analytics world.

Structure is everything

So, we can easily solve our lookup problem, if our data were to magically re-arranged in 2 column fashion – Data & Value.

Continue »

CP022: What’s a Macro? Introduction to Excel VBA, Macros & Automation

Published on Oct 9, 2014 in Chandoo.org Podcast Sessions, VBA Macros
CP022: What’s a Macro? Introduction to Excel VBA, Macros & Automation

In the 22nd session of Chandoo.org podcast, lets do some macros.

What is in this session?

VBA (or macros, automation) is a mystery for many of us. So in this podcast, lets unravel the mystery behind it and get you started with the awesome world of automation.

In this podcast, you will learn,

  • What is a macro?
  • What is VBA then?
  • Reasons for using VBA Macros
    • Automation
    • Extending Excel’s capabilities
    • Efficiency
    • Applications
  • How to get started with VBA Macros?
  • Using Recorder
  • Example Macro
  • Going beyond recorder – Learning VBA
Continue »

A dashboard to visualize this FIFA worldcup [guest post]

This is a guest post by Krishna, a football lover & one of our readers.

The wait for lifting the most valued priced in football for Germans was finally over. For a football fan, world cup is best time that is scheduled every four years and that if your favorite team lifting the trophy is like your crush is going on a date with you. 🙂

A sneak-peek at the final dashboard

Here is the final dashboard (it has more functionality than depicted). Click on it to enlarge.

FIFA 2014 Worldcup Excel dashboard

Continue »

CP015: Handling big data, Controlling model railroad sets, Overcoming Excel obsession & more – ASK CHANDOO

Published on Jul 24, 2014 in Chandoo.org Podcast Sessions

In the 15th session of Chandoo.org podcast, lets answer some of your burning Excel questions.

Handling big data, Controlling model railroad sets, Overcoming Excel obsession & More - ASK CHANDOO

What is in this session?

Around last week, I invited you to ask me anything. More than 150 people responded to this call and sent in their questions. Since answering all the questions is not possible, I handpicked roughly 10 questions to answer in this episode of Chandoo.org podcast.

In this podcast, you will learn,

  1. How to fill blank cells with data from above
  2. How to work with Big data in Excel
  3. How to combine data from multiple sources & analyze it in Excel
  4. How I am managing my life after starting Chandoo.org
  5. How to create and distribute stand-alone Excel products
  6. How to control a model railroad set using Excel VBA (not fully answered)
  7. & more…
Continue »

How fireworks animated chart is made [video tutorial]

Published on Jul 17, 2014 in Charts and Graphs, VBA Macros

On July 4th this year, I published an animated fireworks chart for you. Many of you liked it. Quite a few wanted to know how its made.

So here is a video explaining the construction of fireworks.

(You can see this video on our YouTube Channel too)

Continue »

4th of July Fireworks – an Excel animation for you

Published on Jul 4, 2014 in Charts and Graphs, VBA Macros

To all our readers & friends from USA,

I wish you a happy, fun & safe 4th of July.

For the last 4th of July (2013), we (Jo, kids & I) were in USA. We went to Washington DC to meet up a few friends for that weekend. And we had one of the most memorable evenings of our lives when we went to national mall area in the evening to watch beautifully choreographed fireworks. Kids really loved the amazing display of fire-crackers and enthusiasm.

While we all are back in India this time, it doesn’t mean we cant celebrate 4th of July. So I made some fireworks. In Excel of course.

Here is a little Excel animation I made for all of us.

4th of July Fireworks – Excel animation

First watch this quick demo (<15 secs)

Continue »

CP011: 5 Excel magic tricks to impress your boss

Published on Jun 19, 2014 in Chandoo.org Podcast Sessions
CP011: 5 Excel magic tricks to impress your boss

If you want to create magical effect with your Excel workbook (or report, dashboard, model), then hear no further. In this episode, we explore 5 very powerful magic tricks you can apply to get jaw dropping reactions from your bosses, clients & colleagues.

In this podcast, you will learn,

  • Annoucements
  • Why magic
  • 5 Excel Magic Tricks
  • 1: Conditional formatting
  • 2: Form controls + Charts
  • 3: Pivot tables + Slicers
  • 4: Macros + Automation
  • 5: Using right feature @ right time
  • How to learn these magic tricks
  • Conclusions
Continue »

Top 10 things we struggle to do in Excel & awesome remedies for them

Top 10 things we struggle to do in Excel & awesome remedies for them

Recently we asked you, what do you struggle doing in Excel? 170 people responded to this survey and shared their struggles. In this post, lets examine the top 10 struggles according to you and awesome remedies for them.

Continue »