<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>vlookup on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/vlookup/</link>
    <description>Recent content in vlookup on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 23 Mar 2009 15:37:44 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/vlookup/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Motion charts in Excel</title>
      <link>https://www.s-anand.net/blog/motion-charts-in-excel/</link>
      <pubDate>Thu, 12 Mar 2009 13:56:26 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/motion-charts-in-excel/</guid>
      <description>&lt;p&gt;Creating &lt;a href=&#34;http://www.google.com/search?q=motion+chart&#34;&gt;motion charts&lt;/a&gt; in Excel is a simple four-step process.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Get the data in a tabular format with the columns [date, item, x, y, size]  &lt;/li&gt;&lt;li&gt;Make a “today” cell, and create a lookup table for “today”  &lt;/li&gt;&lt;li&gt;Make a bubble chart with that lookup table  &lt;/li&gt;&lt;li&gt;Add a scroll bar and a play button linked to the “today” cell&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;For the impatient, here’s a &lt;a href=&#34;https://files.s-anand.net/blog/a/motion-chart.xls&#34;&gt;motion chart spreadsheet&lt;/a&gt; that you can tailor to your needs.&lt;br&gt;For the patient and the puzzled, here’s a quick introduction to bubble and motion charts.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What is a bubble chart?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;A bubble chart is a way of capturing 3 dimensions. For example, the chart below could be the birth, literacy rate and population of countries (X-axis, Y-axis and size). Or the growth, margin and market cap of companies. &lt;/p&gt; &lt;p&gt;&lt;a title=&#34;Bubble chart&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-bubble-chart_3348447675_o-png.webp&#34;&gt;&lt;img height=&#34;300&#34; alt=&#34;Example of a bubble chart&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-bubble-chart_3348447675_o-png.webp&#34; width=&#34;450&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It lets you compare three dimensions at a glance. The size dimension is a different from the X and Y axes, though. It’s not easy to compare differences in size. And the eye tends to focus on the big objects. So usually, size is used highlight important things, and the X and Y axes used to measure the performance of these things.&lt;/p&gt; &lt;p&gt;If I were to summarise bubble charts in a sentence, it would be: &lt;em&gt;bubble charts show the performance of important things (in two dimensions)&lt;/em&gt;. (In contrast, &lt;a href=&#34;https://www.s-anand.net/blog/visualisation-centralising-improves-productivity/&#34;&gt;Variwide charts&lt;/a&gt; show the same on one dimension.)&lt;/p&gt; &lt;p&gt;Say you’re a services firm. You want to track the productivity of your most &lt;em&gt;expensive&lt;/em&gt; groups (“the important things”). Productivity is measured by 2 parameters: &lt;em&gt;utilisation&lt;/em&gt; and &lt;em&gt;margin&lt;/em&gt;. The bubble chart would then have the &lt;em&gt;expense&lt;/em&gt; of each group as the size, and its &lt;em&gt;utilisation&lt;/em&gt; and &lt;em&gt;contribution&lt;/em&gt; as the X and Y axes.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What is a motion chart?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Motion charts are animated bubble charts. &lt;em&gt;They &lt;font color=&#34;#ff0000&#34;&gt;track &lt;/font&gt;the performance of important things over time (in two dimensions)&lt;/em&gt;. This is chart with 4 dimensions. But not all data with 4 dimensions can be plotted as a motion chart. One dimension has to be time, and another has to be linked to the importance of the item.&lt;/p&gt;&lt;object classid=&#34;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#34; codebase=&#34;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&#34; width=&#34;451&#34; height=&#34;334&#34; id=&#34;motion-chart.swf&#34;&gt;  &lt;param name=&#34;movie&#34; value=&#34;/a/motion-chart.swf&#34;&gt;  &lt;param name=&#34;quality&#34; value=&#34;high&#34;&gt;  &lt;param name=&#34;bgcolor&#34; value=&#34;#ffffff&#34;&gt;  &lt;embed src=&#34;https://www.s-anand.net/blog/a/motion-chart.swf&#34; quality=&#34;high&#34; bgcolor=&#34;#ffffff&#34; width=&#34;451&#34; height=&#34;334&#34; name=&#34;motion-chart.swf&#34; type=&#34;application/x-shockwave-flash&#34; pluginspage=&#34;http://www.macromedia.com/go/getflashplayer&#34;&gt;&lt;/embed&gt;  &lt;/object&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Motion charts were pioneered by &lt;a href=&#34;http://en.wikipedia.org/wiki/Hans_Rosling&#34;&gt;Hans Rosling&lt;/a&gt; and his &lt;a href=&#34;http://www.ted.com/index.php/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen.html&#34;&gt;TED Talk&lt;/a&gt; shows you the true power of motion charts.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;How do I create these charts?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Use the &lt;a href=&#34;http://www.google.com/ig/directory?url=www.google.com/ig/modules/motionchart.xml&#34;&gt;Motion Chart Gadget&lt;/a&gt; to display any of your data on a web page. Or use &lt;a href=&#34;http://docs.google.com/&#34;&gt;Google Spreadsheets&lt;/a&gt; if you need to see the chart on a spreadsheet: motion charts are built in. &lt;/p&gt; &lt;p&gt;If you or your viewer don’t have access to these, and you want to use Excel, here’s how.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1. Get the data in a tabular format&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Get the data in the format below. You need the X, Y and size for &lt;em&gt;each thing&lt;/em&gt;, for &lt;em&gt;each date&lt;/em&gt;.&lt;/p&gt; &lt;table class=&#34;lines numbers&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Thing&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;X&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Y&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;64%&lt;/td&gt; &lt;td&gt;11%&lt;/td&gt; &lt;td&gt;1&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;B&lt;/td&gt; &lt;td&gt;14%&lt;/td&gt; &lt;td&gt;33%&lt;/td&gt; &lt;td&gt;2&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;C&lt;/td&gt; &lt;td&gt;78%&lt;/td&gt; &lt;td&gt;55%&lt;/td&gt; &lt;td&gt;3&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;D&lt;/td&gt; &lt;td&gt;57%&lt;/td&gt; &lt;td&gt;73%&lt;/td&gt; &lt;td&gt;4&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;E&lt;/td&gt; &lt;td&gt;39%&lt;/td&gt; &lt;td&gt;32%&lt;/td&gt; &lt;td&gt;5&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;F&lt;/td&gt; &lt;td&gt;40%&lt;/td&gt; &lt;td&gt;81%&lt;/td&gt; &lt;td&gt;6&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;09/02/2009&lt;/td&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;64%&lt;/td&gt; &lt;td&gt;12%&lt;/td&gt; &lt;td&gt;1&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;09/02/2009&lt;/td&gt; &lt;td&gt;B&lt;/td&gt; &lt;td&gt;14%&lt;/td&gt; &lt;td&gt;33%&lt;/td&gt; &lt;td&gt;2&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;09/02/2009&lt;/td&gt; &lt;td&gt;C&lt;/td&gt; &lt;td&gt;78%&lt;/td&gt; &lt;td&gt;56%&lt;/td&gt; &lt;td&gt;3&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;09/02/2009&lt;/td&gt; &lt;td&gt;D&lt;/td&gt; &lt;td&gt;57%&lt;/td&gt; &lt;td&gt;73%&lt;/td&gt; &lt;td&gt;4&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;09/02/2009&lt;/td&gt; &lt;td&gt;E&lt;/td&gt; &lt;td&gt;39%&lt;/td&gt; &lt;td&gt;32%&lt;/td&gt; &lt;td&gt;5&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;09/02/2009&lt;/td&gt; &lt;td&gt;F&lt;/td&gt; &lt;td&gt;40%&lt;/td&gt; &lt;td&gt;81%&lt;/td&gt; &lt;td&gt;6&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;..&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;To make life (and lookups) easier, add a column called “Key” which concatenates the date and the things. Typing “=A2&amp;amp;B2” will concatenate cells A2 and B2. (&lt;font color=&#34;#ff0000&#34;&gt;Red cells&lt;/font&gt; use formulas.)&lt;/p&gt; &lt;table class=&#34;lines numbers&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Date&lt;/td&gt; &lt;td&gt;Thing&lt;/td&gt; &lt;td&gt;Key&lt;/td&gt; &lt;td&gt;X&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;td&gt;Size&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;39852A&lt;/font&gt;&lt;/td&gt; &lt;td&gt;64%&lt;/td&gt; &lt;td&gt;11%&lt;/td&gt; &lt;td&gt;1&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;B&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;39852B&lt;/font&gt;&lt;/td&gt; &lt;td&gt;14%&lt;/td&gt; &lt;td&gt;33%&lt;/td&gt; &lt;td&gt;2&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;C&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;39852C&lt;/font&gt;&lt;/td&gt; &lt;td&gt;78%&lt;/td&gt; &lt;td&gt;55%&lt;/td&gt; &lt;td&gt;3&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;08/02/2009&lt;/td&gt; &lt;td&gt;D&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;39852D&lt;/font&gt;&lt;/td&gt; &lt;td&gt;57%&lt;/td&gt; &lt;td&gt;73%&lt;/td&gt; &lt;td&gt;4&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt; &lt;td&gt;…&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;&lt;strong&gt;2. Make a “today” cell, and create a lookup table for “today”&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Create a cell called “Offset” and type in 0 as its value. Add another cell called Today whose value is the start date (08/02/2009 in this case) plus the offset (0 in this case)&lt;/p&gt; &lt;table class=&#34;lines&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Offset&lt;/td&gt; &lt;td&gt;0&lt;/td&gt; &lt;td&gt;(Just type 0)&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Today&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;08/02/2009&lt;/font&gt;&lt;/td&gt; &lt;td&gt;Use a formula: =STARTDATE + OFFSET&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;Now, if you change the offset from 0 to 1, “Today” changes to 09/02/2009. By changing just this one cell, we can create a table that holds the bubble chart details for that day, like below.&lt;/p&gt; &lt;table class=&#34;lines&#34;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;strong&gt;Thing&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;X&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Y&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt; &lt;td&gt;&lt;strong&gt;Formula&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;A&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;44%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;19%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;1&lt;/font&gt;&lt;/td&gt; &lt;td rowspan=&#34;6&#34;&gt; &lt;p&gt;X =VLOOKUP(TODAY &amp;amp; THING, DATA, 2, 0)&lt;/p&gt; &lt;p&gt;Y =VLOOKUP(TODAY &amp;amp; THING, DATA, 3, 0)&lt;/p&gt; &lt;p&gt;Size =VLOOKUP(TODAY &amp;amp; THING, DATA, 4, 0)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;B&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;6%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;13%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;2&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;C&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;90%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;71%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;3&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;D&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;41%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;61%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;4&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;E&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;59%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;40%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;5&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;F&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;16%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;77%&lt;/font&gt;&lt;/td&gt; &lt;td&gt;&lt;font color=&#34;#ff0000&#34;&gt;6&lt;/font&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;Check out my &lt;a href=&#34;https://files.s-anand.net/blog/a/motion-chart.xls&#34;&gt;motion chart spreadsheet&lt;/a&gt; to see how these are constructed.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3. Make a bubble chart with that lookup table&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This is a simple Insert – Chart. Go through the chart types and select bubble. Play around with the data selection until you get the X, Y and Size columns right.&lt;/p&gt; &lt;p&gt;&lt;a title=&#34;Bubble chart&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-bubble-chart_3348447675_o-png.webp&#34;&gt;&lt;img height=&#34;300&#34; alt=&#34;Example of a bubble chart&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-bubble-chart_3348447675_o-png.webp&#34; width=&#34;450&#34;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;4. Add a scroll bar and a play button linked to the “today” cell&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Now for the magic. Add a scroll bar below the chart.&lt;br&gt;&lt;em&gt;Excel 2007 users:&lt;/em&gt; Go to Developer – Insert and add a scroll bar.&lt;br&gt;&lt;em&gt;Excel 2003 users:&lt;/em&gt; Go to View - Toolbars - Control Toolbox and add a scroll bar&lt;/p&gt; &lt;p&gt;Right click on the scroll bar, go to Format Control… and link the scroll bar to the “Offset” cell. Now, as you move the scroll bar, the value in the offset cell will change to reflect it. So the “today” cell will change too. So will the lookup table. And so will the chart.&lt;/p&gt; &lt;p&gt;Next, create a button called “Play” and edit its code.&lt;br&gt;&lt;em&gt;Excel 2007 users:&lt;/em&gt; Right click the button, go to Developer – View Code.&lt;br&gt;&lt;em&gt;Excel 2003 users:&lt;/em&gt; Right click the button and select View Code.&lt;/p&gt; &lt;p&gt;Type in the following code for the button’s click event:&lt;/p&gt;
```vb
Declare Sub Sleep Lib &#34;kernel32&#34; (ByVal dwMilliseconds As Long)
&lt;p&gt;Sub Button1_Click()
Dim i As Integer
For i = 0 To 40: &amp;rsquo; Replace 40 with your range
Range(&amp;ldquo;J1&amp;rdquo;).Value = i &amp;rsquo; Replace J1 with your offset cell
Application.Calculate
Sleep (100)
Next
End Sub&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;p&amp;gt;Now clicking on the Play button will give you this glorious motion chart in Excel:&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;object classid=&amp;#34;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&amp;#34; codebase=&amp;#34;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&amp;#34; width=&amp;#34;451&amp;#34; height=&amp;#34;334&amp;#34; id=&amp;#34;motion-chart.swf&amp;#34;&amp;gt;
&amp;lt;param name=&amp;#34;movie&amp;#34; value=&amp;#34;/a/motion-chart.swf&amp;#34;&amp;gt;
&amp;lt;param name=&amp;#34;quality&amp;#34; value=&amp;#34;high&amp;#34;&amp;gt;
&amp;lt;param name=&amp;#34;bgcolor&amp;#34; value=&amp;#34;#ffffff&amp;#34;&amp;gt;
&amp;lt;embed src=&amp;#34;/a/motion-chart.swf&amp;#34; quality=&amp;#34;high&amp;#34; bgcolor=&amp;#34;#ffffff&amp;#34; width=&amp;#34;451&amp;#34; height=&amp;#34;334&amp;#34; name=&amp;#34;motion-chart.swf&amp;#34; type=&amp;#34;application/x-shockwave-flash&amp;#34; pluginspage=&amp;#34;http://www.macromedia.com/go/getflashplayer&amp;#34;&amp;gt;&amp;lt;/embed&amp;gt;
&amp;lt;/object&amp;gt;

---

## Comments

&amp;lt;!-- wp-comments-start --&amp;gt;
- **[Vinoth](http://vinovator.blogspot.com)** _13 Mar 2009 9:27 am_:
  Hi Anand.Very useful article.
  I can use similar motion chart to showcase how each of my team member&amp;#39;s cumulative performance is contributing at the overall level.
- **Zoheb** _21 Mar 2009 12:02 am_:
  also could you rewrite the whole code,on how to slow it down.. i tried inserting it.but i don&amp;#39;t think i put it in the right place.
- **David** _18 Mar 2009 2:16 pm_:
  Thanks! That did the trick! Great Blog!
- **David** _17 Mar 2009 7:56 pm_:
  Is there a way to slow it down?
- **[S Anand](http://www.s-anand.net/)** _17 Mar 2009 8:44 pm_:
  Sure. Use the sleep function. Add this to the module:
 \
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Declare Sub Sleep Lib &amp;ldquo;kernel32&amp;rdquo; (ByVal dwMilliseconds As Long)&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\
Then add a Sleep function after `Application.Calculate`
\
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sleep 200&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;- **Nach** _17 Mar 2009 8:50 am_:
Thank you...this is something that I have been trying to do for a long time now...but didnt know how to write the looped macro in Excel.
- **Zoheb** _20 Mar 2009 9:52 pm_:
Hi I had a question, if I wanted the counter by 3, how would i do that?
Thanks
-Zoheb
- **[S Anand](http://www.s-anand.net/)** _23 Mar 2009 7:39 am_:
I&amp;#39;ve changed the code and also revised it in the Excel file. Take a look.
To increment the counter by 3, change the properties of the scroll bar to make the increment 3 instead of 1. (Right click on the scroll bar and select &amp;#34;Properties&amp;#34;)
- **[Al-Hamour](http://www.alhamour.com)** _23 Mar 2009 1:50 am_:
Great post! Thanks for sharing. Time delay code is very useful if you can upload it.. right now it goes too fast to see.
Also, is there a way to make the graph trace each of the moving circles?
- **Venkat** _1 Apr 2009 3:12 pm_:
Thanks Anand. Very useful to represent often boring data like time series analysis.
- **Firman** _17 Apr 2009 3:53 am_:
Thank you so much... i hope in the near future you can give us tutorial / article about how to make it more interactive... say... after we click the bubble we can divide it into smaller / more detailed parts.
Thank you
- **Reginald Vaz** _17 Apr 2009 7:08 pm_:
Extremely useful...thanks a lot for sharing
- **Pradeep Jindal** _2 May 2009 6:57 pm_:
Fabulous! I just starting to do it and find this article...
everything redy and beautiful...
can we add drill down to it
Thank you Anand :)
- **Mike** _12 May 2009 3:43 pm_:
Great Tool. I am also looking for a way to pause the animation. Any ideas?
- **Pete** _4 Jun 2009 1:30 am_:
Is there a way to embed the animation in excel?
- **[S Anand](http://www.s-anand.net/)** _14 Jul 2009 5:25 pm_:
Don&amp;#39;t think we can export these motion charts into Powerpoint, I&amp;#39;m afraid.
- **[Sunny](http://www.iimb.ernet.in)** _13 Jul 2009 9:38 pm_:
Is there any way I can export these motion charts into microsoft powerpoint?
- **beth** _15 Jul 2009 1:50 am_:
do you know how you can embed this into a powerpoint? when i try to embed, you can&amp;#39;t do the motion.
- **Sabnish** _11 Jul 2009 11:26 am_:
Hi...great help...thanks a lot....but for my presentation i will need to see the evolution by years...in this example it is the date which gets incremented...how to increase the year instead...thanks...hope you can help me....
- **Michael Brault** _8 Dec 2009 3:11 pm_:
I have the motion chart embed into a Dashboard with other charts and tables. The macro increments all tables. Any ida on how to limit the macro to a single table of data?
- **Alex** _22 Jan 2010 10:57 pm_:
Having problems creating it in Excel for mac. Any ideas?
- **[derek](http://i-ocean.blogspot.com/)** _14 May 2010 7:17 pm_:
Another kind of motion chart can be a line or bar chart showing the evolution of multiple line shapes or histograms with time.
You can also add a time display to show when the events are occurring. Rosling&amp;#39;s application cleverly displays the year as a giant watermark behind the bubbles, so the eye doesn&amp;#39;t have to stray to a corner to see the time. I&amp;#39;ve often thought a clock face symbol might be a neat alternative to a simple text display.
- **[Jeff Koenig](http://connellcommodities.com)** _5 Feb 2010 7:33 pm_:
Great bubble chart solution. I&amp;#39;ve been looking for a 3D bubble chart so I can move bubbles in 3D space, allowing me to track an additional dimension. Any ideas?
- **Dirk Cornette** _13 Apr 2010 10:23 pm_:
Great solution Anand.
I am trying to customize it, showing 1 customer per buble, size = revenue, Y-axes = number of our staff working for that customer, X axes showing margin %.
Solving two issues would make it more gapminder-like.
1. How to add a data label to the buble, showing the customer name ?
2. How to show the year ?
Any ideas ?
- **[Mahdi Meskin](http://www.meskin.ir)** _4 Jun 2010 6:24 am_:
Great post!
thanks.
- **[Drew](http://www.totallyawesomemapping.com)** _11 May 2010 4:10 pm_:
Just found your post, and I can&amp;#39;t wait to try it out. Thanks for the tips!
- **NIall Tallon** _18 Aug 2010 12:08 pm_:
HI Anand,
This is great - a while since I updated and wrote macros - I am running a 64bit version of windows 7 and excel 2010 - and the macro won&amp;#39;t run there - any ideas?
Thanks,
Niall
- **Niall Tallon** _18 Aug 2010 12:19 pm_:
HI Again,
Actually just have to add &amp;#34;PTRsafe&amp;#34; in the macro near the declare statement.
Pretty easy.......Email me if you want a copy with the changed macro.
Best regfards and with thanks,
NT
- **Kamesh.M** _15 Sep 2010 10:00 am_:
Great Post!
This can be done without Macros also.....
http://www.webanalyticsindia.com/2009-11-20/motion-chart-in-excel/
Best Regards
Kamesh
- **Pvl** _27 Jun 2012 8:41 am_:
Hi, Anand,
Thanks for good tutorial. But I&amp;#39;m very interested in creating such motion chart in Flash, like You posted as an example. Any suggestions how to do that?
- **Scott** _20 Dec 2010 4:31 pm_:
Hi,
Is it possible to make this so the individual bubbles have different colors or at least unique labels? I can only seem to have all the bubbles be one color and one label &amp;#39;Thing&amp;#39;....
Thanks,
Scott
- **James Arnott** _8 Sep 2011 2:56 pm_:
Hi - I&amp;#39;ve come late to this but am finding it very useful. Thanks for sharing your work with us as it would have taken me ages to work it out myself.
- **Anna** _2 Nov 2011 3:52 pm_:
Does anyone know if it is possible to include this chart in a Share Point site? I know you can upload dashboards with the REST API but I don&amp;#39;t know if it is possible to add motion charts. Can you shed some light on this topic. Thanks!
- **Atisha Banjare** _11 Nov 2011 11:06 am_:
Hi!! Great stuff and really useful. Thanks
- **kalaisam** _23 Jan 2012 11:37 am_:
Hai,
I read Excel file from my Google account using Zend. I call Motion chart using Publish gadget script. It automatically assign the default X-axis and Y-axis .I wish to assign the X- axis and Y-axis . I choose Advanced settings option to change the Axis and then call that script string in Php code. But Default axis only displayed ! How can i fix that ?
- **Bill** _16 Apr 2012 5:41 pm_:
Is it possible to have bubble diameters also show thier diameter change over time? Various smoothing algorithms could be offered to choose from.
- **Nal** _23 Mar 2012 6:48 am_:
hi, this is fantastic! Is it possible to put this into my powerpoint presentation?
thanks!
- **Sreekar** _3 Sep 2011 9:19 pm_:
Hi Anand - I tried using your macro and it gives a compilation error &amp;#34;Sub or Function not defined&amp;#34;; would you know how I could fix it? I am using 2010 Excel
- **Alan** _15 Sep 2011 1:01 am_:
Can you please post me the updated version for Excel 2010.
I dont know how to update the declare statement to include &amp;#34;PTR Safe&amp;#34;
Thank you
Alan
- **Chris** _28 Mar 2012 11:08 pm_:
Wonderful! Thanks for all this work. I use Excel 2010 and it shouldn&amp;#39;t be too hard to adapt it (I won&amp;#39;t bother you about it).
It&amp;#39;s too bad it can&amp;#39;t be embedded in PPT. Microsoft definitely needs to add this kind of thing to PowerPoint.
- **Kirk** _23 Jun 2012 4:57 pm_:
I tried this macro but got an error saying the macros in this project are disabled. Anyone have an idea on what I am doing wrong?
Sub Button20\_Click()
Declare Sub Sleep Lib &amp;#34;kernel32&amp;#34; (ByVal dwMilliseconds As Long)
Sub Button1\_Click()
Dim i As Integer
For i = 0 To 40:
Range(&amp;#34;J1&amp;#34;).Value = i
Application.Calculate
Sleep (100)
Next
End Sub
- **CK** _6 May 2012 10:18 am_:
Thank you for this useful tutorial.
How did you embed the motion chart moving on your web page please?
- **Gary** _16 Jul 2012 2:37 am_:
Oh, sorry to mention that it stops at the Sleep (100). I even tried to add the Declare but for some odd reason it keep advancing above where I type it. I appreciate any help.
Thank you
- **Gary** _16 Jul 2012 2:34 am_:
First let me say thank you. The code you posted did not work for me. I am using MS Excel 2010 and I keep getting the same error.
Microsoft Visual Basic for Applications
Compile error:
Sub or Function not defined.
Can you help me fix this error. This is what I have typed.
Sub Button1\_Click()
Dim i As Integer
For i = 1 to 39:
Range (&amp;#34;C1&amp;#34;).Value = 1
Application.Calculate
Sleep (100)
Next
End Sub
- **Seymon** _15 Jul 2012 2:17 am_:
it is awesome, thanks
- **Merry Turnip** _9 Oct 2012 12:21 pm_:
THANK YOU SO MUCH, FOR YOUR TUTORIAL, I HAVE TRIED IT AND IT WORKS.
THANK YOU SO MUCH.
By the way, when I change Years to months, however, it doesn&amp;#39;t work. Could you please teach me how to change year to months?
THANK AGAIN
REGARDS
- **Mukesh** _5 Sep 2012 11:24 pm_:
Hi Anand,
I need to show the data for only 4 years.
Could you please tell me how to slow down the motion further ?
I tried increasing the value of the number in Sleep (), but its not making a difference
- **maanu** _19 Nov 2012 10:34 am_:
hi anand, i want to build a bubble chart for my applications globally with four variables, application investment strategy meaning invest, maintain or disinvest, cost, location, and functional match. i want to handle location with color as there are only 8 locations, and cost with size. i want app investment strategy as numbers (1,2 ,3) on y axis and functional match with five categories (0-20 21-40,41-60,61-80,81-100) on x axis. can we use your technique to achieve this ?
- **Obed** _18 Feb 2013 8:02 am_:
Thanks for sharing your wealth of knowledge with others. Great stuff!!!
- **Michael** _24 Feb 2013 5:31 am_:
In their infinite wisdom Google is discontinuing motion chart gadgets in 2013 so a big thank you for this alternative:-)
- **[Ganeshan Nadarajan](http://www.solidradicle.com)** _16 Jan 2013 12:27 pm_:
Motion charts are animated bubble charts. They track the performance of important things over time (in two dimensions). This is chart with 4 dimensions. But not all data with 4 dimensions can be plotted as a motion chart. One dimension has to be time, and another has to be linked to the importance of the item.
- **isspenguin** _17 Jan 2013 5:12 pm_:
Hello - How do I create &amp;#34;trails&amp;#34; that trace the path of individual bubbles in Excel, like they do in Google motion charts?﻿ Please feel free to email me your response at rdivya09@gmail.com. Thanks!
- **[Stefan Selby](https://googledrive.com/host/0B0Ms4sM4a2RoSW9YYmkxbVlMc2M/vbamotioncharts.html)** _25 Nov 2013 8:07 pm_:
It is interesting to see how you did your motion charts. I have created an app that does more than just bubble charts. I have done the same for most excel charts and a speedometer chart. It is shared with the world have a look at:https://googledrive.com/host/0B0Ms4sM4a2RoSW9YYmkxbVlMc2M/vbamotioncharts.html
- **[sireesh](http://www.ses.com)** _11 Jul 2013 10:17 pm_:
how to transfer bubble chart to ppt?
- **Mike** _26 Jul 2013 11:02 pm_:
Does the code work with 2010? Nothing happens when I copy and paste it in. When I run debug the sleep (100) highlights even after I replace the data as you indicated with my own. Granted, I&amp;#39;m new to developer stuff so I may be making a silly mistake.
- **Max** _19 Jul 2013 6:50 pm_:
Thanks for the great write up. Any ideas as to how one could add a &amp;#34;tail&amp;#34; behind the moving bubble to track the past data?
- **Diana** _9 Nov 2013 4:08 am_:
Actually.....shows how hopeless I actually am....I am in Excel 2013, not 2010!
- **Diana** _9 Nov 2013 4:05 am_:
I&amp;#39;m also asking the same question as Mike #5. I can&amp;#39;t get the code to work in 2010 and the sleep (100) highlights. As I&amp;#39;m not a programmer and really don&amp;#39;t have a clue, I&amp;#39;d love to get this handled. I&amp;#39;ve come this far and have great individual graphs!. Thanks....
- **Loveleen** _8 Apr 2014 3:57 am_:
I can’t get the code to work in 2010 and the sleep (100) highlights. As I’m not a programmer to understand the coding. COuld you please how it works in 2010
regards,
Loveleen
- **Ye** _13 Mar 2015 6:28 pm_:
Thank you so much for this workaround (I usually did this with googledocs) in excel. I am trying to make this work - not based on increasing date, but on temperature. Imagine a chemistry-based excel sheet and I want to show how different components change volume, weight and surface opaqueness with rising temperature. Right now, I struggle to make the today and offset work for me since the example is (like google docs) based on a start date.
Thanks for your reply in advance.
Y
- **Durga** _18 Jun 2014 4:11 pm_:
This was very useful for me. Thank you for describing the play button logic. On the web site when I click on the pause or the stop button the chart stops at that moment but I didn&amp;#39;t see it in the excel. Could you please tell me how to code the stop button or the pause button on excel.
- **Nathalie** _11 Jun 2014 5:06 pm_:
It is very interesting. However, there is one little problem that stops me from using this kind of chart: the size of the bubbles does not follow the variation of size values in time. For instance, if bubble A remains the biggest bubble over the time, it will keep the same size in the chart, even if its value has increased by a factor 3 one year. I would have expected the size to be 3 times bigger than in the previous year. Is there a way to remedy this (without having to use Google motion charts)?
- **[Stef](http://developingdata.azurewebsites.net/)** _30 Dec 2014 12:46 pm_:
I have created an app that creates these and other types of motion charts. You can find it at http://developingdata.azurewebsites.net/Excel/ExcelMotionCharts
Knowing excel and reading this article would help (good article) but I have tried to make the app easy to use.
- **Des Klass** _1 Jan 2015 1:01 am_:
Hi I am having the same problem as Mike(#5) and just can&amp;#39;t get the motion working. Greatful for any suggestions(I am using my own data)
- **Atom** _18 Dec 2014 8:07 am_:
How do i change the years to seconds?
- **Ryan** _14 Aug 2015 7:42 pm_:
I&amp;#39;m also having the same Sleep (100) error in 2010. Is there a work around for this?
- **[Niall](http://n/a)** _22 Mar 2016 5:07 pm_:
HI There - really love the motion chart work here - I&amp;#39;ve been using it for a while - but I recently went to O365 and the graphs I made don&amp;#39;t work anymore - any ideas?
Many thanks,
Niall
- **Rochny** _15 Feb 2019 12:24 pm_:
I can’t get the code to work in 2016 and the sleep (100) highlights.
Can get help, as i am not a programmer.
regards
Rochny
- **[JEP](http://patientflow.dk)** _3 Apr 2017 9:26 am_:
The code work with 2010 if you delete &amp;#34;sleep (100)&amp;#34; :-)
&amp;lt;!-- wp-comments-end --&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Animated charts in Excel</title>
      <link>https://www.s-anand.net/blog/animated-charts-in-excel/</link>
      <pubDate>Tue, 19 Aug 2008 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/animated-charts-in-excel/</guid>
      <description>&lt;p&gt;Watch &lt;a href=&#34;http://en.wikipedia.org/wiki/Hans_Rosling&#34;&gt;Hans Rosling&lt;/a&gt;&#39;s &lt;a href=&#34;http://www.ted.com/&#34;&gt;TED Talks&lt;/a&gt; on &lt;a href=&#34;http://www.ted.com/index.php/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen.html&#34;&gt;debunking third world myths&lt;/a&gt; and &lt;a href=&#34;http://www.ted.com/index.php/talks/hans_rosling_reveals_new_insights_on_poverty.html&#34;&gt;new insights on poverty&lt;/a&gt; and ask yourself: &lt;b&gt;could I do this with my own data?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Yes. Google has a gadget called &lt;a href=&#34;http://www.google.com/ig/directory?url=www.google.com/ig/modules/motionchart.xml&#34;&gt;MotionChart&lt;/a&gt; that lets you do this.&lt;/p&gt;
&lt;p&gt;Now, you could put this up on your web page, but that&#39;s not quite useful when presenting to a client. (It is shocking, but there are many practical problems getting an Internet connection at a client site. The room doesn&#39;t have a connection. The cable isn&#39;t long enough. You can&#39;t access the LAN. Their proxy requires authentication. The connection is too slow. Whatever.)&lt;/p&gt;
&lt;p&gt;So you need this in Excel. Let me explain a variant of the technique I described &lt;a href=&#34;https://www.s-anand.net/blog/excel-make-your-model-visually-obvious/&#34;&gt;earlier&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&#39;s start by creating a simple bubble chart. &lt;/p&gt;
&lt;p&gt;&lt;a title=&#34;Bubble chart&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-1-scatter_2777902130_o-png.webp&#34;&gt;&lt;img height=&#34;374&#34; alt=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-1-scatter_2777902130_o-png.webp&#34; width=&#34;480&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For each item in a bubble chart, you need 3 pieces of data: the X-axis, Y-axis and size. This graph shows three items A, B and C in one year: 2001. To animate this, you need data for more years, so let&#39;s create that.&lt;/p&gt;
&lt;p&gt;&lt;a title=&#34;Data for multiple years&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-2-data_2777043817_o-png.webp&#34;&gt;&lt;img height=&#34;221&#34; alt=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-2-data_2777043817_o-png.webp&#34; width=&#34;269&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The first 3 rows contain the same data as before, except that I&#39;ve added a &amp;quot;Year&amp;quot; column and a &amp;quot;Key&amp;quot; column (which is just a concatenation of the Year and the Item). The data now goes on for many more years. &lt;/p&gt;
&lt;p&gt;Now we need to create a scroll bar that can be used to change the year. So add a scroll bar below the bubble chart...&lt;/p&gt;
&lt;p&gt;&lt;a title=&#34;Adding a Scroll Bar&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-3-format-control_2777043857_o-png.webp&#34;&gt;&lt;img height=&#34;250&#34; alt=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-3-format-control_2777043857_o-png.webp&#34; width=&#34;496&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;... and right click the scroll bar and go to Format Control. Now, select the cell link to some cell ($H$1 in this case). Now, if you move the scroll bar, the cell value will change.&lt;/p&gt;
&lt;p&gt;&lt;a title=&#34;Scroll bar format control&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-4-link_2777902264_o-png.webp&#34;&gt;&lt;img height=&#34;469&#34; alt=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-4-link_2777902264_o-png.webp&#34; width=&#34;497&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All you need to do is to now change the source data for the chart based on the year. From the table on the left, VLOOKUP the year + item, and put this into the table on the right. When the year in the cell H1 changes, the data updates itself. So now, as you move the scroll bar, cell H1 changes, then so does the data and hence the graph. &lt;/p&gt;
&lt;p&gt;&lt;a title=&#34;Using VLOOKUP to change the source data&#34; href=&#34;https://www.s-anand.net/blog/assets/flickr-5-formula_2777902326_o-png.webp&#34;&gt;&lt;img height=&#34;303&#34; alt=&#34;&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-5-formula_2777902326_o-png.webp&#34; width=&#34;500&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is what the animation looks like.&lt;/p&gt;
&lt;object classid=&#34;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#34; codebase=&#34;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&#34; width=&#34;485&#34; height=&#34;342&#34;&gt;
    &lt;param name=&#34;movie&#34; value=&#34;/gapminder.swf&#34;&gt;
    &lt;param name=&#34;quality&#34; value=&#34;high&#34;&gt;
    &lt;param name=&#34;bgcolor&#34; value=&#34;#ffffff&#34;&gt;
    &lt;embed src=&#34;https://www.s-anand.net/blog/gapminder.swf&#34; quality=high bgcolor=&#34;#ffffff&#34; width=&#34;485&#34; height=&#34;342&#34; name=&#34;Gapminder.swf&#34; type=&#34;application/x-shockwave-flash&#34; pluginspage=&#34;http://www.macromedia.com/go/getflashplayer&#34;&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;p&gt;And here&amp;rsquo;s the &lt;a href=&#34;https://files.s-anand.net/blog/a/gapminder.xls&#34;&gt;Excel file&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;29 Jan 2009 9:47 am&lt;/em&gt;:
For this particular example, Ganesh, you&amp;rsquo;re probably better of not&lt;br&gt;
using the scheme I described. It&amp;rsquo;s probably better to reduce the data&lt;br&gt;
to fewer dimensions (e.g. in pairs: dimensions (A,B), (A,C), (B,C),&lt;br&gt;
etc.). Sorry, without a sense of what the data is about, I&amp;rsquo;m not sure&lt;br&gt;
I can think of a good way of doing this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Ganesh&lt;/strong&gt; &lt;em&gt;3 Feb 2009 3:21 am&lt;/em&gt;:
Hi Anand
As I told you earlier, I came up with something like the above image. 5 processes each measured on 4 Dimensions.
I was trying to get each of these respective xl charts one on top of the other on Z-axis which could make the representation in 3D.. But I could not.
Regards
&lt;ul&gt;
&lt;li&gt;S Ganesh&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;21 Jan 2009 6:38 am&lt;/em&gt;:
I think it would depend on the dimensions, SG. The best way of modelling up&lt;br&gt;
to 4 dimensions I&amp;rsquo;ve seen are using Hans Rosling&amp;rsquo;s charts at gapminder.org.&lt;br&gt;
But you&amp;rsquo;d need the 4 dimensions to be mappable to X, Y, size and time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SG&lt;/strong&gt; &lt;em&gt;21 Jan 2009 7:03 am&lt;/em&gt;:
Thanks Anand for the immediate response. A bit more to explain myself.&lt;br&gt;
&lt;br&gt;
The things that I would like to depict are these.&lt;br&gt;
To model the system A, I have 4 dimensions each with varying weights. The response score for each dimension is expressed as %. In bubble chart terms- Say, one of the dimension is represented as a bubble, then the outer circle diameter denote the Relative weight of the dimension and a circle inside denote the actual score.&lt;br&gt;
&lt;br&gt;
Roughly, I visualize to represent the Model as a stack for 4 bubbles (dimmensions)one on top of other. something like a 3D color model&lt;br&gt;
&lt;br&gt;
In the example, that you referred.. Size and time are something which is common to X and Y..&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
Ganesh S&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;l b&lt;/strong&gt; &lt;em&gt;13 Nov 2008 12:16 pm&lt;/em&gt;:
size can be the annual sales value of a product&lt;br&gt;
x can be year&lt;br&gt;
y growth&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shaun&lt;/strong&gt; &lt;em&gt;24 Nov 2008 10:18 am&lt;/em&gt;:
Hi. Very useful way of doing this - thanks!&lt;br&gt;
&lt;br&gt;
Is there any way to automate the scroll bar so that I can click just one button and the graph updates itself automatically?&lt;br&gt;
&lt;br&gt;
Thanks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Theertharao n&lt;/strong&gt; &lt;em&gt;8 Dec 2008 2:44 am&lt;/em&gt;:
very nice and simple&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SG&lt;/strong&gt; &lt;em&gt;21 Jan 2009 6:27 am&lt;/em&gt;:
Hi Anand,&lt;br&gt;
&lt;br&gt;
This is very nice, I landed on this page googling for something I wanted for in xl charting.&lt;br&gt;
&lt;br&gt;
Can you help ? I am trying to model a &amp;ldquo;System A&amp;rdquo;. I have 4 identified dimensions D1, D2, D3, D4 for it, each on a scale of say, 1 to 400.&lt;br&gt;
&lt;br&gt;
I wanted to represent them in one composite chart to show, this is how the &amp;ldquo;System A&amp;rdquo; looks like. Is there anyway out ?&lt;br&gt;
&lt;br&gt;
Thanks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thejesh GN&lt;/strong&gt; &lt;em&gt;20 Aug 2008 2:45 am&lt;/em&gt;:
cool tip. I will use it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sundar R&lt;/strong&gt; &lt;em&gt;1 Sep 2008 8:20 pm&lt;/em&gt;:
Does this method work only in MS Excel 2007? I am using MS Excel 2003 and I was not able to get the &amp;ldquo;Control&amp;rdquo; tab in the properties of the scroll bar.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;2 Sep 2008 12:11 am&lt;/em&gt;:
@Sundar: It works on Excel 2003 as well, except I&amp;rsquo;m not sure what the menu shortcuts are.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sundar R&lt;/strong&gt; &lt;em&gt;3 Sep 2008 12:16 am&lt;/em&gt;:
After some googling I found out the problem: There are scroll bar object in both &amp;ldquo;Control toolbox&amp;rdquo; and &amp;ldquo;Forms&amp;rdquo; tool bars. The scroll bar in the &amp;ldquo;Control toolbox&amp;rdquo; does not have the &amp;ldquo;Control&amp;rdquo; tab in its properties. The scroll bar in the &amp;ldquo;Forms&amp;rdquo; does have the &amp;ldquo;Control&amp;rdquo; tab in its properties. I was adding the scroll bar object from the Control toolbox toolbar. That&amp;rsquo;s the reason I was not able to get it working earlier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sridhar&lt;/strong&gt; &lt;em&gt;17 Sep 2008 10:06 am&lt;/em&gt;:
I don&amp;rsquo;t understand what the &amp;ldquo;size&amp;rdquo; could be in the data.. can u help?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;17 Sep 2008 11:09 am&lt;/em&gt;:
@Sridhar: The size is the radius of the circles. You&amp;rsquo;ll notice that this changes in the animation as well. Initially, the circles are of the same size, but over time, they become bigger or smaller.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://www.animatexl.com&#34;&gt;Phil&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;13 Oct 2009 4:31 pm&lt;/em&gt;:
Hi there,
I&amp;rsquo;ve created a little Excel add-in that does a similar thing, but without the need for adding controls to your Excel worksheet. The user simply creates a table of data, creates a chart from the top row of the table and then uses the add-in&amp;rsquo;s menu to run the animation.
It is free - for now at least :) - and can be downloaded from my website - &lt;a href=&#34;http://www.animatexl.com&#34;&gt;http://www.animatexl.com&lt;/a&gt;.
I&amp;rsquo;d be very interested to know what anyone thinks of it.
Regards
Phil.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mercy&lt;/strong&gt; &lt;em&gt;12 Aug 2010 2:59 am&lt;/em&gt;:
Hi -
Your idea is so fantastic!
I am trying to use it with a line/area graph, and it is more or less taking shape - got all the filters and vlookups all in place like you recommended; I even put in place 3 scroll bars so that it is now a dynamic graph that is getting controlled by 3 different variables.
The only thing I wondered about was how to get the scroll bar to display the value of its position as it is getting scrolled.
Also I wanted to display the variable names that each of the scroll bars are representing and their max and min points.
I ma sure there is some VB code that can be pasted somewhere - but I needed to get this done by tomorrow, so I&amp;rsquo;m writing this SOS in the hope you&amp;rsquo;ll read.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ash&lt;/strong&gt; &lt;em&gt;4 May 2010 5:19 pm&lt;/em&gt;:
Hi everyone,
Ive been playing about with this technique (which is highly appreciated by the way). For anyone working with percentages, i.e. you want the slider to affect a percentage scoring, you need to do this in a different way (or so I have found - if anyone has a simpler way of doing this, please post).
Since Excel stores a percentage number as a decimal (e.g. 10% is stored as 0.1), you will need to have a separate reference cell to that where the percentage is stored.
For example, in cell A2, type the number 5.
In cell A1, Type &amp;rsquo; =A2/100&amp;rsquo; and then change the cell format to Percentage.
Add in the slider and set the parameters as per the instructions above, making the cell reference A2, minimum value 0, and maximum value 10.
The slider will now change the percentage by increments of 10%
To get greater accuracy, change the formula in cell A1 to reflect how many decimals you wish to go to. For example, for 1 d.p. use &amp;rsquo; =A2/1000&amp;rsquo;, for 2d.p. use &amp;rsquo; =A2/10000.
You will also need to change the parameters in the maximum/minimum values in the slider control options to allow you to reach 100%. You will see what i mean once you play about with it.
Ash&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mercy&lt;/strong&gt; &lt;em&gt;12 Aug 2010 3:00 am&lt;/em&gt;:
Thanks, meanwhile for this really helpful website.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LexiK&lt;/strong&gt; &lt;em&gt;15 Jun 2012 12:20 pm&lt;/em&gt;:
These are amazing, thanks!
Just a quick query-I can build these in excel no problem, however, if I try to build the same within an excel macro-enabled insert in powerpoint although if I manually scroll along the bar, the graphics change, they don&amp;rsquo;t seem to when the scroll is moved by the &amp;lsquo;play&amp;rsquo; button. Any ideas as to how to get around this?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://excelhero.com/blog/&#34;&gt;Daniel Ferry&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;18 May 2011 6:08 pm&lt;/em&gt;:
Hello.
I just found your site. I thought you might be interested in the dozens of Excel animated charts on my blog:
&lt;a href=&#34;http://www.excelhero.com/blog/2010/05/animated-business-chart.html&#34;&gt;http://www.excelhero.com/blog/2010/05/animated-business-chart.html&lt;/a&gt;
Kind regards,
Daniel Ferry
Excel Hero Academy&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arun&lt;/strong&gt; &lt;em&gt;1 Jan 2012 5:21 am&lt;/em&gt;:
This is not working with the months level data , as numerical conversion of the months not possible , pl help&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;vinoth&lt;/strong&gt; &lt;em&gt;11 Aug 2012 4:23 am&lt;/em&gt;:
whether the animation will work if i copy it in ppt.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gustavo&lt;/strong&gt; &lt;em&gt;16 Feb 2014 5:11 pm&lt;/em&gt;:
Hi Anand,
Do you know if this works with Excel for Mac or Numbers? I use Excel for Mac and get an error for the animation button when it looks for Kernes32, I&amp;rsquo;m using your data for the animated chart where you inserted a button with code.
thanks in advance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jayan&lt;/strong&gt; &lt;em&gt;6 Feb 2019 12:58 pm&lt;/em&gt;:
Hi Ananad. Your blog on bubble chart was very useful and I Created a test case bubble chart. It work fine in when using the scroll bar, however when executing the vba script using the play button it doesn&amp;rsquo;t work. The excel data are changing as per the dimension, however the bubble charts not moving as they moves in scroll bar. Could you kindly advise&amp;hellip;please&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;David Ashley&lt;/strong&gt; &lt;em&gt;22 Apr 2020 8:39 pm&lt;/em&gt;:
Hi Anand -
I am using the code for the animated bubble charts. I don’t know what the “Sleep (100)” is for as I keep getting an error (compile error sub or function not defined) related to that when I run the script. It highlights “Sleep” in the error. Thanks for any help you can provide.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Excel - Avoid manual labour 2</title>
      <link>https://www.s-anand.net/blog/excel-avoid-manual-labour-2/</link>
      <pubDate>Fri, 09 Dec 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/excel-avoid-manual-labour-2/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Rule #3: Avoid manual labour (continued)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reconciling data&lt;/strong&gt; is where I spend most of my time on Excel. Say you have a list of branches by city from 2 banks. You want to know where both banks have branches. Excel doesn&amp;rsquo;t know that Kolkata is Calcutta. There are 500 cities, and you have 30 minutes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-snapshot_71837170_o-png.webp&#34;&gt;&lt;img alt=&#34;Excel snapshot&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-snapshot_71837170_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use VLOOKUP&lt;/strong&gt; for a start. If Bank A&amp;rsquo;s cities are in column A (say 2-500) and Bank B&amp;rsquo;s cities in column B (say 2-400), in C2 type VLOOKUP(A2, B$2:B$400, 1, 0) (read Excel help &amp;ndash; all I&amp;rsquo;ll say is, &lt;strong&gt;don&amp;rsquo;t miss out the 0 at the end&lt;/strong&gt;: otherwise you get approximate match, and that&amp;rsquo;s not good). Copy the formula to down to C500. Similarly, in D2 type VLOOKUP(B2, A$2:A$500, 1, 0). Copy the formula down to D400.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-snapshot_71837168_o-png.webp&#34;&gt;&lt;img alt=&#34;Excel snapshot&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-snapshot_71837168_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll see the #N/A where there&amp;rsquo;s no match. #N/A in Column C means Bank A has a branch here, but Bank B does not. Column D has the converse. But we&amp;rsquo;re not done yet. There could be spelling mistakes. Using &lt;strong&gt;two VLOOKUPs simplifies that problem considerably&lt;/strong&gt;. We just need to match the cities having #N/A on both lists to check for alternate spellings of cities &amp;ndash; which is a lot less work! So prepare a separate list: unmatched cities from Bank A, and unmatched cities from Bank B. (See the section on removing unwanted rows to simplify this.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.s-anand.net/blog/assets/flickr-excel-snapshot_71837166_o-png.webp&#34;&gt;&lt;img alt=&#34;Excel snapshot&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/flickr-excel-snapshot_71837166_o-png.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sort both the lists while remembering the original order&lt;/strong&gt;. You&amp;rsquo;ll want to remember the original order often &amp;ndash; so just add a column, number it sequentially (1,2,3&amp;hellip; use Alt-E-I-S), and sort the city names along with the numbers. When you want to get back the original order, just sort by the numbers again. To avoid distraction, you can move or hide these numbers. Now, you have a sorted list of unmatched cities. Notice that you can visually match many of these cities. &lt;strong&gt;There&amp;rsquo;s nothing easier to search (visually) than a sorted list.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Finally, when you&amp;rsquo;ve mapped all your columns, the ones that are remaining are the ones where there is no overlap.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;9 Dec 2005 7:22 pm&lt;/em&gt;:
Anand, I have a suggestion&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;9 Dec 2005 10:16 pm&lt;/em&gt;:
Yeah?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:12 pm&lt;/em&gt;:
it got erased the last time&amp;hellip;ok..this is what I wanted to say..&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:14 pm&lt;/em&gt;:
can you please categorize all these excel tips (rules) and add it as a bookmark on the right, so that we can refer to it at one shot rather than searching the archives.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:14 pm&lt;/em&gt;:
btw thank you so much for taking your time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:16 pm&lt;/em&gt;:
some of the text is getting erased when I submit a comment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:17 pm&lt;/em&gt;:
I said &amp;ldquo;btw thank you so much for taking your time and explainning this to us&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:18 pm&lt;/em&gt;:
you know what..I think the comment system is not supporting symbols&amp;hellip;for example the &amp;lsquo;and&amp;rsquo; symbol&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anonymous&lt;/strong&gt; &lt;em&gt;10 Dec 2005 3:19 pm&lt;/em&gt;:
thanks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;10 Dec 2005 8:40 pm&lt;/em&gt;:
You&amp;rsquo;re right, symbols are causing a problem. I&amp;rsquo;ll try and fix that. Will put in the links as well, once I finish the series. Thanks!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;11 Dec 2005 10:02 pm&lt;/em&gt;:
Hopefully, it&amp;rsquo;s fixed. &amp;amp; - that works.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tanmoy Sinha&lt;/strong&gt; &lt;em&gt;19 Sep 2008 7:28 am&lt;/em&gt;:
I had a similar issue at a much larger scale.. Had to match about 11,000 records in a database of about 44,000 using company names and city, both of which had spelling inconsistencies..&lt;br&gt;
&lt;br&gt;
What I did was use the &amp;lsquo;Advanced Filter&amp;rsquo; function in Excel and wrote a small VB program to list out the filtered results in a dialog box allowing user to select the relevant ones using &amp;lsquo;human&amp;rsquo; intelligence.&lt;br&gt;
&lt;br&gt;
The trick was in identifying a small enough part of the company&amp;rsquo;s name that would serve as a &amp;lsquo;signature&amp;rsquo; and at the same time throw back as (few) relevant results. What worked best for me was the following: \
&lt;ul&gt;
&lt;li&gt;Use the first 3 chars of the second word in the company name which is 4 or more characters long. i.e. avoid using the first word if there is another word 4 or more chars long. \&lt;/li&gt;
&lt;li&gt;Use wildcard characters &amp;lsquo;?*&amp;rsquo; before the 3 chars determined in the step above.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
  </channel>
</rss>
