Finally, I got some time to sit down and do what I love most – write a blog post to make you awesome in Excel. After a whirlwind trip to Sydney, I am back in India to spend few days with my kids & wife before rushing to Australia to run 2nd leg of my training programs (in Perth, Melbourne & Brisbane). I did 2 sessions in Sydney – one for KPMG and other for public and both went very well. We got lots of positive feedback and people really loved it. I am saving the details for another post, but today lets talk about Interactive Sales Chart using Excel.
Take a look at the Interactive Sales Chart
First, take a look at interactive sales chart. Today, you will learn how to build this using Excel.

Inspiration for this chart
Before we learn how you can create such a chart, let me tell where the inspiration came from. Yesterday, Persol, a forum member asked, How to make an info-radar chart, where he mentioned the below chart from Good.is

[Click here to play with this chart]
While I took inspiration from the above chart, I replaced the radar chart with a regular column chart (as column charts are easier to read) and modified the data to a sales data set.
How to create interactive sales chart in Excel?
First, take a look at the data
The sales data for this chart looked like this:

I have set up this data in an Excel Table called as tblSales so that it is easier to write formulas.
The formulas
To calculate various values in the chart, we use ample doses of SUMIFS formula.
The Interactivity
When you click on any year, region or product name, we run worksheet_seletionchange event. This tells our calculation engine which year, region & product are chosen. Then the formulas would (re)calculate the data for charts. This updates the charts & conditional formats.
[Related: Show on-demand details in Excel using VBA]
Here is how the interactive chart works:

How to create interactive charts like this – Video
Since the actual mechanics of this are quite elaborate, I made a short video (15 min) explaining how various parts of this chart work. Please watch it below.
[You can watch the video on our Youtube channel too]
Download Interactive Sales Chart Workbook
Click here to download the workbook & play with it. Examine the macros & formulas to learn more.
How do you like this chart?
I really liked Good.is chart and wanted to see how much of it we can do in Excel. It was a fun exercise. I have noticed that such charts excite people (decision makers too) and make your reports fun.
What about you? How do you like the interactive sales chart? What additions / modifications would you do to it? Please share your thoughts using comments.
Create Interactive Charts using Excel
Interactive charts are one my favorite visualizations. They let users play with the chart & decide what they want. So, naturally I write about them every now and then. Please go thru these examples if you want to learn various interactive charting techniques in Excel.
- Show top x values in a chart interactively
- Interactive dashboard using hyperlinks
- Suicides vs. Murders – Interactive Excel Chart
- Create a quick dynamic chart in Excel
- Interactive charts that leave your boss drooling
- More on Interactive Charts
I also recommend enrolling in our Excel + VBA Class if you want to learn these techniques and create stunning reports & charts. Click here to learn more about our Excel + VBA training program.

















6 Responses to “Make VBA String Comparisons Case In-sensitive [Quick Tip]”
Another way to test if Target.Value equal a string constant without regard to letter casing is to use the StrCmp function...
If StrComp("yes", Target.Value, vbTextCompare) = 0 Then
' Do something
End If
That's a cool way to compare. i just converted my values to strings and used the above code to compare. worked nicely
Thanks!
In case that option just needs to be used for a single comparison, you could use
If InStr(1, "yes", Target.Value, vbTextCompare) Then
'do something
End If
as well.
Nice tip, thanks! I never even thought to think there might be an easier way.
Regarding Chronology of VB in general, the Option Compare pragma appears at the very beginning of VB, way before classes and objects arrive (with VB6 - around 2000).
Today StrComp() and InStr() function offers a more local way to compare, fully object, thus more consistent with object programming (even if VB is still interpreted).
My only question here is : "what if you want to binary compare locally with re-entering functions or concurrency (with events) ?". This will lead to a real nightmare and probably a big nasty mess to debug.
By the way, congrats for you Millions/month visits 🙂
This is nice article.
I used these examples to help my understanding. Even Instr is similar to Find but it can be case sensitive and also case insensitive.
Hope the examples below help.
Public Sub CaseSensitive2()
If InStr(1, "Look in this string", "look", vbBinaryCompare) = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub
Public Sub CaseSensitive()
If InStr("Look in this string", "look") = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub
Public Sub NotCaseSensitive()
'doing alot of case insensitive searching and whatnot, you can put Option Compare Text
If InStr(1, "Look in this string", "look", vbTextCompare) = 0 Then
MsgBox "woops, no match"
Else
MsgBox "at least one match"
End If
End Sub