<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Peltier Tech Blog</title>
	
	<link>http://peltiertech.com/WordPress</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Wed, 16 May 2012 17:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/peltiertech/EsrO" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="peltiertech/esro" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.0/</creativeCommons:license><image><link>http://peltiertech.com/WordPress/</link><url>http://peltiertech.com/WordPress/wp-content/PTSlogoSmall.png</url><title>Peltier Technical Services, Inc.</title></image><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">peltiertech/EsrO</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>New Survey: What Spreadsheet Programs Do You Use?</title>
		<link>http://peltiertech.com/WordPress/new-survey-what-spreadsheet-programs-do-you-use/</link>
		<comments>http://peltiertech.com/WordPress/new-survey-what-spreadsheet-programs-do-you-use/#comments</comments>
		<pubDate>Wed, 16 May 2012 07:00:14 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3402</guid>
		<description>Please participate an improved, small, non-scientific survey about spreadsheet version usage. My previous survey allowed only one version of Excel to be selected for work and for home. I knew that this was limiting, but the survey seemed easier to set up this way. But a few comments corrected my thinking, and a few responses [...]</description>
			<content:encoded><![CDATA[<h3>Please participate an improved, small, non-scientific survey about spreadsheet version usage.</h3>
<p>My previous survey allowed only one version of Excel to be selected for work and for home. I knew that this was limiting, but the survey seemed easier to set up this way. But a few comments corrected my thinking, and a few responses helpfully had multiple versions entered as &#8220;Other&#8221;, so I&#8217;m going to set that one aside, and offer the following survey. As it turns out, it was not really any harder to set it up. Live and learn. You can select any and all spreadsheet versions that you use.</p>
<p>WordPress sometimes does funny stuff with embedded content like this survey. If the survey does not appear when the page is first loaded, wait a few seconds, then refresh the page.</p>
<p><iframe src="https://docs.google.com/a/peltiertech.com/spreadsheet/embeddedform?formkey=dEh5dkpsS3FYa0pnZG5nNDRXOUZfN2c6MQ" width="760" height="1300" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" title="PTS Chart Utilities: Waterfall, Cluster-Stack Column, Box and Whisker, Marimekko"><img src="http://peltiertech.com/Utility/pix/pts_banner_map.png" alt="PTS Chart Utilities: Waterfall, Box and Whisker, Cluster-Stack, Panel, Marimekko, Dot, Panel" border="0" /></a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/RWLYhhgTfh7ccgCdyCBGFdyv6HE/0/da"><img src="http://feedads.g.doubleclick.net/~a/RWLYhhgTfh7ccgCdyCBGFdyv6HE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RWLYhhgTfh7ccgCdyCBGFdyv6HE/1/da"><img src="http://feedads.g.doubleclick.net/~a/RWLYhhgTfh7ccgCdyCBGFdyv6HE/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/peltiertech/EsrO?a=9zRP9x5B_NU:0zJuNquVVZ8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/peltiertech/EsrO?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/peltiertech/EsrO/~4/9zRP9x5B_NU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/new-survey-what-spreadsheet-programs-do-you-use/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Survey: What Version of Excel Do You Use?</title>
		<link>http://peltiertech.com/WordPress/survey-what-version-of-excel-do-you-use/</link>
		<comments>http://peltiertech.com/WordPress/survey-what-version-of-excel-do-you-use/#comments</comments>
		<pubDate>Tue, 15 May 2012 07:00:08 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3401</guid>
		<description>Update: Survey closed, Results posted This quick and dirty survey has been closed. Thanks to all who participated. Results will be posted in the near future. In addition, a newer and better version of the survey will be/has been posted at New Survey: What Spreadsheet Programs Do You Use? The original survey (shown below) allowed [...]</description>
			<content:encoded><![CDATA[<h3>Update: Survey closed, Results posted</h3>
<p>This quick and dirty survey has been closed. Thanks to all who participated. Results will be posted in the near future. In addition, a newer and better version of the survey will be/has been posted at <a class="vt-p" title="New Survey: What Spreadsheet Programs Do You Use?" href="http://peltiertech.com/WordPress/new-survey-what-spreadsheet-programs-do-you-use/">New Survey: What Spreadsheet Programs Do You Use?</a></p>
<p>The original survey (shown below) allowed one response each for version of Excel used at work and home. This ignores those who use multiple versions, for example, developers who need too make sure their spreadsheets will work on any version of Excel.</p>
<p style="text-align: center;"><img class="aligncenter" title="Excel Version Usage Survey" src="http://peltiertech.com/images/2012-05/ExcelVersionSurvey.png" alt="Excel Version Usage Survey" width="333" height="671" /></p>
<p>My main intention in this survey was to get an idea of how many Excel users have upgraded to &#8220;New&#8221; versions (2007 and 2010), and how many are still using the &#8220;Classic&#8221; versions (1997 through 2003). The following chart shows my findings.</p>
<p style="text-align: center;"><img class="aligncenter" title="Breakdown of Excel versions in use" src="http://peltiertech.com/images/2012-05/ExcelVersionBreakdown.png" alt="Breakdown of Excel versions in use" width="256" height="187" /></p>
<p>So about 86% of users have upgraded, while 14% are staying pat. The percentage was almost identical for usage at work and at home. I&#8217;m not sure if I&#8217;m surprised.</p>
<p>A handful of respondents entered multiple versions into the &#8220;Other&#8221; boxes in the survey; if these responses included both Classic and New, I didn&#8217;t count them. The follow-up survey will try to capture this usage more accurately.
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<A HREF="http://www.exceluser.com/cmd.asp?Clk=2474005"><IMG SRC="http://www.exceluser.com/images/info/pub/pnp468_01.jpg" ALT="Create Excel dashboards quickly with Plug-N-Play reports." WIDTH="468" HEIGHT="60" border=0></A><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=2474005" width="0" height="0" border="0"></p>

<p><a href="http://feedads.g.doubleclick.net/~a/PtIqqkLEjyETXe17Bj9zrAkzNT0/0/da"><img src="http://feedads.g.doubleclick.net/~a/PtIqqkLEjyETXe17Bj9zrAkzNT0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PtIqqkLEjyETXe17Bj9zrAkzNT0/1/da"><img src="http://feedads.g.doubleclick.net/~a/PtIqqkLEjyETXe17Bj9zrAkzNT0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/peltiertech/EsrO?a=Jwbdjy43Z44:b5y9A4Km4QQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/peltiertech/EsrO?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/peltiertech/EsrO/~4/Jwbdjy43Z44" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/survey-what-version-of-excel-do-you-use/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>VBA Conditional Formatting of Charts by Value and Label</title>
		<link>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value-and-label/</link>
		<comments>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value-and-label/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 22:55:30 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[VBA]]></category>
		<category><![CDATA[conditional formatting]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3398</guid>
		<description>In Conditional Formatting of Excel Charts I showed how to simulate conditionally formatting in your charts charts. The trick is to set up ranges containing formulas for each of the conditions, so that if the condition for that range is met, the value will be plotted in the appropriately formatted chart series. Otherwise it doesn&amp;#8217;t [...]</description>
			<content:encoded><![CDATA[<p>In <a class="vt-p" title="Conditional Formatting of Excel Charts" href="http://peltiertech.com/WordPress/conditional-formatting-of-excel-charts/">Conditional Formatting of Excel Charts</a> I showed how to simulate conditionally formatting in your charts charts. The trick is to set up ranges containing formulas for each of the conditions, so that if the condition for that range is met, the value will be plotted in the appropriately formatted chart series. Otherwise it doesn&#8217;t appear in the chart, but a differently formatted point will.</p>
<p>In most cases the technique in the cited article is the best approach, since it does not use VBA and it updates with the speed of Excel formulas. Sometimes, though, you need a VBA solution.</p>
<h2>Prepare for VBA Formatting</h2>
<p>In a worksheet named &#8220;ColorSheet&#8221;, I have set up a range that has row headers corresponding to the category labels I expect to encounter, and column headers corresponding to values I want to use as cut-offs for conditional formatting. The cell at the intersection of the category label row and value column is formatted in the way I want the chart&#8217;s data to be formatted. For example, a point with a category label of Alpha will be some shade of blue, while a point labeled Eta will be orange. The shade of the color used is lighter for smaller values and darker for larger values. I have included a label &#8220;other&#8221; in case an unexpected label is found, and a value of &#8220;above&#8221; in case the maximum in the table is exceeded. The light shades might be too light, and in any case, shades of color shouldn&#8217;t be expected to provide much resolution when encoding information.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_ColorRange.png" alt="Table of colors by value and category label" width="404" height="171" /></p>
<p>Naturally, your labels and values will be different, and in fact you may need more complicated algorithms in the code.</p>
<p>I&#8217;ve named this region &#8220;ColorRange&#8221;. Note that this name appears in the Name Box above column A when the range is selected.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_ColorName.png" alt="Named range of colors by value and label" width="404" height="195" /></p>
<p>Here is my data and chart. The bars have the default formatting for series 1.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_Chart1.png" alt="Original chart with default bar colors" width="379" height="222" /></p>
<h2>Apply Formatting by Running the VBA Code</h2>
<p>Here is the chart after running the <tt class="tt">FormatPointByCategoryAndValue</tt> procedure.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_Chart2.png" alt="Original chart with VBA formatted bars" width="379" height="222" /></p>
<p>After changing the values and rerunning the procedure, the chart&#8217;s bars keep their color, though the shades have become lighter or darker. The light green for Gamma is too light to distinguish from gray, and almost too light to see at all. I should probably go back and darken all of the lighter shades.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_Chart3.png" alt="Same chart with modified values and reformatted bars." width="379" height="222" /></p>
<p>Now all of the data has changed, and in fact, more data is plotted in the chart. The code still works as expected. Note the Omega series, which is colored gray because that label was not included in the original color table.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_Chart4.png" alt="Chart with completely new data and reformatted bars" width="379" height="222" /></p>
<h2>The VBA Procedure</h2>
<p>The code is not too complicated. After the declarations (Dim and Consts) the first thing that the code does is abort if the user has not selected a chart (a little extra effort is always well-spent if it that a run time error). There is a line of code which, if uncommented, will remind the user to select a chart by showing this dialog:</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_NoActiveChartMessage.png" alt="&quot;Select a chart, dummy!&quot;" width="255" height="161" /></p>
<p>Then the range containing the colors is identified and its values put into an array to make the values easier to work with.</p>
<p>The first series of the active chart is defined as the series we are formatting. The category labels (XValues) and values (Values) are put into arrays, also for ease of processing.</p>
<p>The code then looks at each point&#8217;s value and label, to determine which cell has the desired formatting. The rows and columns are looped starting at 2, since the first of each contains an irrelevant label. The looping stops one count before the end. If a match is not found, the loop counter points to the last row or column.</p>
<p>Finally the point is given the same fill color as the matching cell in the color table. Note that there are two sets of syntax, one for Classic Excel (2003 and earlier) and the other for Neo Excel (2007 and later). I&#8217;ve commented out the 2003 syntax, because I now use 2010 for most of my outward-facing work.</p>
<pre class="vbasmall"><code>Sub FormatPointByCategoryAndValue()
  Dim rColor As Range
  Dim vColor As Variant
  Dim srsColor As Series
  Dim iRow As Long
  Dim iCol As Long
  Dim iPoint As Long
  Dim vCategories As Variant
  Dim vValues As Variant

  Const sColorSheetName As String = "ColorSheet"
  Const sColorRangeName As String = "ColorRange"

  If ActiveChart Is Nothing Then
<span style="color: #339966;">    ' uncomment following line to alert user
    'MsgBox "Select a chart and try again.", vbExclamation, _
        "No Active Chart"
</span>    GoTo ExitHere
  End If

  Set rColor = Worksheets(sColorSheetName).Range(sColorRangeName)
  vColor = rColor.Value

  Set srsColor = ActiveChart.SeriesCollection(1)

  With srsColor
    vCategories = .XValues
    vValues = .Values

<span style="color: #339966;">    ' cycle through points
</span>    For iPoint = 1 To .Points.Count
<span style="color: #339966;">      ' find category (row)
</span>      For iRow = LBound(vColor, 1) + 1 To UBound(vColor, 1) - 1
        If vCategories(iPoint) = vColor(iRow, 1) Then Exit For
      Next

<span style="color: #339966;">      ' find value (column)
</span>      For iCol = LBound(vColor, 2) + 1 To UBound(vColor, 2) - 1
        If vValues(iPoint) &lt;= vColor(1, iCol) Then Exit For
      Next

<span style="color: #339966;">      ' apply color of identified cell to given point
      ' Excel 2007+ syntax
</span>      .Points(iPoint).Format.Fill.ForeColor.RGB = _
          rColor.Cells(iRow, iCol).Interior.Color

<span style="color: #339966;">      ' Excel 2003- syntax
      '.Points(iPoint).Interior.ColorIndex = _
          rColor.Cells(iRow, iCol).Interior.ColorIndex
</span>    Next
  End With

ExitHere:

End Sub</code></pre>
<p>To run the procedure, select the chart, then press Alt+F8, select <tt>FormatPointByCategoryAndValue</tt>, and click Run.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/VBA_CF_XY_MacroDialog.png" alt="Run Macro" width="374" height="359" /></p>
<p>Here are some closely related articles from the archives:</p>
<p style="padding-left: 30px;">To format by point value, see <a class="vt-p" href="http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value/">VBA Conditional Formatting of Charts by Value</a>.<br />
To format by category label, see <a class="vt-p" href="http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-category-label/">VBA Conditional Formatting of Charts by Category Label</a>.<br />
To format by series name, see <a class="vt-p" href="http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-series-name/">VBA Conditional Formatting of Charts by Series Name</a>.</p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<A HREF="http://www.exceluser.com/cmd.asp?Clk=1374689"><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></A><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>

<p><a href="http://feedads.g.doubleclick.net/~a/fRzVNI_kQndM0oMTTnOtNIRd0j0/0/da"><img src="http://feedads.g.doubleclick.net/~a/fRzVNI_kQndM0oMTTnOtNIRd0j0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fRzVNI_kQndM0oMTTnOtNIRd0j0/1/da"><img src="http://feedads.g.doubleclick.net/~a/fRzVNI_kQndM0oMTTnOtNIRd0j0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/peltiertech/EsrO?a=tVdhjU9q3wA:IENmiBe1jCg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/peltiertech/EsrO?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/peltiertech/EsrO/~4/tVdhjU9q3wA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/vba-conditional-formatting-of-charts-by-value-and-label/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Excel Fan Chart Showing Uncertainty in Projections</title>
		<link>http://peltiertech.com/WordPress/excel-fan-chart-showing-uncertainty-in-projections/</link>
		<comments>http://peltiertech.com/WordPress/excel-fan-chart-showing-uncertainty-in-projections/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 13:32:57 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Types]]></category>
		<category><![CDATA[Fan Chart]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3394</guid>
		<description>A reader emailed me this chart of GDP, with actual values through late 2008 and projected values for the next two years. To illustrate the uncertainty in the predictions, colored bands were drawn alongside the solid line prediction. The bands become lighter as the distance from the prediction line increases. Because of this appearance, showing [...]</description>
			<content:encoded><![CDATA[<p>A reader emailed me this chart of GDP, with actual values through late 2008 and projected values for the next two years. To illustrate the uncertainty in the predictions, colored bands were drawn alongside the solid line prediction. The bands become lighter as the distance from the prediction line increases. Because of this appearance, showing the data fanning out, this type of chart is called a Fan Chart.</p>
<p>The reader wondered how to create this shaded-band effect in a fan chart. This tutorial was developed using Excel 2010, but the procedure is applicable to all Excel versions.</p>
<p>The chart comes from page 34 of <a class="vt-p" title="A Preliminary Analysis of the President's Budget and an Update of CBO's Budget and Economic Outlook" href="http://www.cbo.gov/ftpdocs/100xx/doc10014/03-20-PresidentBudget.pdf">A Preliminary Analysis of the President&#8217;s Budget and an Update of CBO&#8217;s Budget and Economic Outlook</a>, published in March 2009 by the Congressional Budget Office.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2009-03/Uncertain00.jpg" alt="Example Fan Chart" width="619" height="334" /></p>
<p><span id="more-3394"></span>I&#8217;ve manually digitized the actual data up to 10/1/08 and the projections from 1/1/09 onward into this tall thin tower of numbers.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2009-03/UncertainData01.png" alt="Actual and Projected Data" width="129" height="443" /></p>
<p>Here is the data plotted in a line chart.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain10.png" alt="" width="639" height="271" /></p>
<p>I&#8217;ve set up the following table to capture the data for the fan. Midline contains the actual and projected values from above. I made up Min and Max so that the fan would grow wider for each successive quarter. I then created values in a and b to split the fan below the midline into three shades of gray, and in c and d to split the fan above the midline into the same three shades of gray. You can use more or fewer calculated columns to increase or decrease the number of shaded regions.</p>
<p>My numbers are arbitrarily calculated. If you have some probabilistic means of generating such values, you should use your calculations instead.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2009-03/UncertainData02.png" alt="Line Chart Data for Fan Chart" width="513" height="443" /></p>
<p>When I add these columns of data as additional lines in the chart, I get the following chart. I&#8217;ve changed the default kaleidoscope of line colors to shades of gray that lighten with increasing distance from the midline. The labels indicate which column in the table above contains data for each line. This chart is fine, but it doesn&#8217;t show the filled area effect.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain11.png" alt="" /></p>
<p>To achieve filled regions, I will use a stacked area chart. In an adjacent range I&#8217;ve added the following table. The dates are the same, as are the minimum and midline predictions. The rest of the data are calculated differences between each line and the previous line, to capture the height of each colored band (distance between lines). For example, the Max value for 1/1/09 in the table below (33) is the difference between the Max value for 1/1/09 in the table above and the d value for 1/1/09 in the table above (11400 minus 11367).</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2009-03/UncertainData03.png" alt="Area Chart Data for Fan Chart" width="513" height="443" /></p>
<p>I&#8217;ve created a stacked area chart using this table of data. Here are my colored bands.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain12.png" alt="Fan Chart Step 1: Stacked Area Chart" width="639" height="271" /></p>
<p>The first thing I did was format the axes and delete the gridlines.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain13.png" alt="Fan Chart Step 2: Format Axes" width="639" height="271" /></p>
<p>Then I converted the Midline series to a Line Chart. This is done by right-clicking on the series, choosing Change Chart Type (or simply Chart Type in older Excel versions), and selecting a line chart style.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain14.png" alt="Fan Chart Step 3: Convert Midline to Line Chart" width="639" height="271" /></p>
<p>Next I made the Min series invisible by formatting it to have no fill.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain15.png" alt="Fan Chart Step 4: Make Min Series Invisible" width="639" height="271" /></p>
<p>Then I rescaled the vertical axis, because I don&#8217;t want all that empty space at the bottom.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain16.png" alt="Fan Chart Step 5: Reset Vertical Axis Scale" width="639" height="271" /></p>
<p>Finally I formatted the Midline to use dark gray for its line, and the area series to have lighter and lighter gray fills the further they are from the midline. I&#8217;ve also deleted the legend.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/Uncertain17.png" alt="Fan Chart Step 6: Format Line and Fill Colors" width="639" height="271" /></p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" title="PTS Chart Utilities: Waterfall, Cluster-Stack Column, Box and Whisker, Marimekko"><img src="http://peltiertech.com/Utility/pix/pts_banner_map.png" alt="PTS Chart Utilities: Waterfall, Box and Whisker, Cluster-Stack, Panel, Marimekko, Dot, Panel" border="0" /></a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/boVECy4EDMebwh7XRncQWLU_8r4/0/da"><img src="http://feedads.g.doubleclick.net/~a/boVECy4EDMebwh7XRncQWLU_8r4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/boVECy4EDMebwh7XRncQWLU_8r4/1/da"><img src="http://feedads.g.doubleclick.net/~a/boVECy4EDMebwh7XRncQWLU_8r4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/peltiertech/EsrO?a=OxsYx6dZr98:-WmFv_4H5rc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/peltiertech/EsrO?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/peltiertech/EsrO/~4/OxsYx6dZr98" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/excel-fan-chart-showing-uncertainty-in-projections/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Excel, Free Rice and MMA</title>
		<link>http://peltiertech.com/WordPress/excel-free-rice-and-mma/</link>
		<comments>http://peltiertech.com/WordPress/excel-free-rice-and-mma/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 07:00:31 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Guest Post]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3387</guid>
		<description>Today I&amp;#8217;m happy to present a guest post by Dr. AnnMaria DeMars. AnnMaria is the intelligent and entertaining author of AnnMaria&amp;#8217;s Blog about statistics, technology, and work and also of AnnMaria&amp;#8217;s Blog on Judo, Business, and Life, which is about &amp;#8220;achieving success in business, sports and academics [and parenting] without ever actually having grown up.&amp;#8221; “If [...]</description>
			<content:encoded><![CDATA[<p><em>Today I&#8217;m happy to present a guest post by Dr. AnnMaria DeMars. AnnMaria is the intelligent and entertaining author of <a title="AnnMaria's Blog - The Julia Group" href="http://www.thejuliagroup.com/blog/">AnnMaria&#8217;s Blog</a> about statistics, technology, and work and also of <a title="AnnMaria's Blog on Judo, Business, and Life" href="http://drannmaria.blogspot.com/">AnnMaria&#8217;s Blog on Judo, Business, and Life</a>, which is about &#8220;achieving success in business, sports and academics [and parenting] without ever actually having grown up.&#8221; </em></p>
<p>“If all you have is a hammer, everything looks like a nail.”</p>
<p>Hard to believe Bernard Baruch died before computer graphics, because he hit the &#8211; um, nail &#8211; right on the head. Some days, it seems the world is comprised of people who fit into one of two categories &#8230;</p>
<ol>
<li>“Find Excel not sufficiently sophisticated for real statistics, don’t you agree?” (Said in the same tone as Thurston Howell III &#8211; look it up, youngsters!)</li>
<li>Believe every problem can be solved by Excel.</li>
</ol>
<p>What’s really interesting is that I fall into both of those categories, not just some of the time but almost every day. Let’s start with last week.  My darling daughter fought for the 135 lb world title on Saturday, and a few weeks ago, she started a free rice group. You can read a bit of the story at <a title="RondaMMA Free Rice" href="http://freerice.com/content-group/rondamma">RondaMMA Free Rice</a>.  In a nutshell (or should I say grain of rice), this is a wonderful site where you can answer questions and for every one correctly answered, 10 grains of rice are devoted to the world food program. Ronda sent free t-shirts, autographed pictures and other swag to fans who were part of her free rice group. Below is one of three Excel charts I did to track the progress at different points in the competition.</p>
<p>Her fans have donated over 20,000,000 grains of rice so far, and God love them for that, but it is safe to conjecture that the average mixed martial arts fan is not a doctoral student in statistics so my challenge was to come up with easy to follow graphics for tracking the results. Even though I am usually using SAS or SPSS all day, I selected Excel for this chart for a couple of reasons. First, the free rice site allows me to download the group data in a .csv file each day, making it easy for me to open in Excel. Second, it is blissfully easy to insert a picture in an Excel chart.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/rice_grains.png" alt="Rice grains in a rice grains chart" width="577" height="369" /></p>
<p>Should you have your own Excel free rice group you want to chart (or anything similar) here are the steps.</p>
<p>1. Create your data. In my case this meant having one column with the dates and a second column with the number donated as of that day.</p>
<p>A.  Each day, I downloaded the csv file that had three columns, a userid (A), a username (B) and number of grains donated (C).  I computed the number for that day by entering into a cell =SUM(C2:CN) where N was however many group members had donated as of that day. This gives me the data for one day.</p>
<p>B. In my master file, type the date, copy the sum from the day’s file and use Paste Special to paste the value only.</p>
<p>2. Format the cells. I went to Format, then Cells, then Number and formatted the cells to have zero decimal places and a comma to separate 1,000.</p>
<p>3. Make the chart: Select the Date and Rice Grains columns. Click Charts and select the first option, which is an area chart.</p>
<p>4. Double-click on your chart and the FORMAT DATA SERIES window shows up. It has an option I have never used because I am a “Serious Academic” (Thurston Howell III accent again) and I don’t work for USA Today and insert pictures in my chart. Until now, when I click on the PICTURE tab and choose insert picture.  I also click on the option to TILE PICTURE AS TEXTURE.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/FormatDataSeriesDialog.png" alt="Format Data Series Dialog" width="353" height="260" /></p>
<p>Because it looks awfully plain with white rice and a white grid, I double-click on it again and choose FILL this time, changing the background color to a pale orange.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/FormatChartAreaDialog.png" alt="Format Chart Area Dialog" width="568" height="265" /></p>
<p>I click on the legend and delete it, because it really is superfluous, add a title, and I have the chart to post to track the contest.</p>
<p>One person asked, “It takes 3,500 grains of rice to fill one bowl. If you raise 1,000,000 grains it’s only fed less than 300 people. How much difference does that make?”</p>
<p>Ronda’s answer was, “If you’re one of those people, it makes a lot of difference to you.”</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/rondamma.jpg" alt="The Champ" width="158" height="312" /></p>
<p>As of now, the group has raised enough rice to give a meal to over 5,500 people who otherwise would have gone hungry.</p>
<p>You can see the fight at <a title="Ronda Rousey vs. Miesha Tate" href="http://www.mmamania.com/2012/3/4/2843919/ronda-rousey-vs-miesha-tate-full-fight-video-highlights-showtime-online-mma">Ronda Rousey vs. Miesha Tate</a> &#8211; caution: graphic violence.
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<A HREF="http://www.exceluser.com/cmd.asp?Clk=2474005"><IMG SRC="http://www.exceluser.com/images/info/pub/pnp468_01.jpg" ALT="Create Excel dashboards quickly with Plug-N-Play reports." WIDTH="468" HEIGHT="60" border=0></A><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=2474005" width="0" height="0" border="0"></p>

<p><a href="http://feedads.g.doubleclick.net/~a/l-9wmjE_Yy7jgX_JFHbGYDzuwnI/0/da"><img src="http://feedads.g.doubleclick.net/~a/l-9wmjE_Yy7jgX_JFHbGYDzuwnI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/l-9wmjE_Yy7jgX_JFHbGYDzuwnI/1/da"><img src="http://feedads.g.doubleclick.net/~a/l-9wmjE_Yy7jgX_JFHbGYDzuwnI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/peltiertech/EsrO?a=BHCjNJ65Bbo:cu33a9wysBY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/peltiertech/EsrO?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/peltiertech/EsrO/~4/BHCjNJ65Bbo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/excel-free-rice-and-mma/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate Nice Axis Scales in Your Excel Worksheet</title>
		<link>http://peltiertech.com/WordPress/calculate-nice-axis-scales-in-your-excel-worksheet/</link>
		<comments>http://peltiertech.com/WordPress/calculate-nice-axis-scales-in-your-excel-worksheet/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 07:00:07 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Chart Axes]]></category>
		<category><![CDATA[Custom Axis Scale]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3389</guid>
		<description>I recently described how How Excel Calculates Automatic Chart Axis Limits. The problem with these automatic limits is that they often leave a little too much white space around the outside of the plotted data, especially between the lowest data point and zero. So in Calculate Nice Axis Scales in Excel VBA I presented code that takes [...]</description>
			<content:encoded><![CDATA[<p>I recently described how <a title="How Excel Calculates Automatic Chart Axis Limits" href="http://peltiertech.com/WordPress/how-excel-calculates-automatic-chart-axis-limits/">How Excel Calculates Automatic Chart Axis Limits</a>. The problem with these automatic limits is that they often leave a little too much white space around the outside of the plotted data, especially between the lowest data point and zero. So in <a title="Calculate Nice Axis Scales in Excel VBA" href="http://peltiertech.com/WordPress/calculate-nice-axis-scales-in-excel-vba/">Calculate Nice Axis Scales in Excel VBA</a> I presented code that takes high and low series values and computes &#8220;nice&#8221; axis scaling parameters. This code could be called from other VBA procedures, or as a user defined function from the worksheet.</p>
<p>What if you want to get your axis scale parameters in the worksheet, but for some reason want to avoid using VBA? In this tutorial I show how to use boring old worksheet formulas to do just that.</p>
<h2>Calculate Axis Scales in the Worksheet</h2>
<p>The following table shows how to set up worksheet calculations of your axis limits. The minimum and maximum of your data are entered into the blue cells B4:B5 (labeled Min and Max), either as constants or as calculated values. Below these values are some calculations.</p>
<p>B6 and B7 (Min&#8217; and Max&#8217;) are adjustments to min and max, adding 1% of the difference between the data max and min to the max, and subtracting this amount from the min. If the values are zero or closer to zero than 1% of the difference, then zero is used. This prevents any values except for zero from being located on the edge of the plot area of the chart. (The formulas shown in column C are used in the adjacent cells in column B.)</p>
<p>B8 and B9 determine what the axis tick spacing (called &#8220;major unit&#8221; by Excel) should be. If this major unit were written in exponential notation, Factor is &#8220;like&#8221; the pre-exponential coefficient and Power is &#8220;like&#8221; the power of ten.</p>
<p>The axis tick spacing (Xmajor) is computed in B3, where Factor is used in the lookup table in A11:B15, and multiplied by a function of Power to determine a nicer tick spacing. The tick spacings you calculate may not be exactly right, do to different chart and font sizes or other factors. You can experiment with the values in the lookup table to try to improve them.</p>
<p>Xmin in B1 is calculated as the largest multiple of Xmajor which is less than Min&#8217;, and Xmax in B2 is the smallest multiple of Xmajor which is greater than Max&#8217;.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/wkfn_01.png" alt="Worksheet Calculation of Axis Scale Parameters" width="523" height="273" /></p>
<p>Use the values in the red cells to adjust the chart axis manually.</p>
<h2>Calculate Axis Scales Allowing User to Override Values</h2>
<p>There are cases where you may want to allow the user to lock in one or more of the axis scale parameters. For example, if your data is for the value axis of a bar chart, you could override the calculated minimum to ensure that the axis scale starts at zero, regardless of the data minimum.</p>
<p>This greatly complicates everything, notably the formulas appearing in column C. The data min and max are in B7:B7 in the modified table below, while the user may enter preferred values into any of the cells B4:B6. Valid entries will be used in B1:B3, invalid entries or blanks will result in values being calculated.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://peltiertech.com/images/2012-03/wkfn_02.png" alt="Worksheet Calculation of Axis Scale Parameters with User Overrides" width="526" height="477" /></p>
<p>The Min&#8217; and Max&#8217; modifications to the data Min and Max use the override min and max values if they are valid, otherwise use the same algorithm as in the previous case.</p>
<p>Power and Factor are calculated the same way as before.</p>
<p>The logic of the new calculations are as follows:</p>
<p style="padding-left: 30px;">Xmajor: if there is a valid override entry for tick spacing, use it, otherwise, calculate it as before from Factor and Power.</p>
<p style="padding-left: 30px;">Xmin: if there is a valid override entry for axis minimum, use it; otherwise, if there is a valid override entry for axis maximum, start counting down from the override maximum in increments of Xmajor, and use the largest value which is less than Min&#8217;; otherwise calculate as before.</p>
<p style="padding-left: 30px;">Xmax: if there is a valid override entry for axis maximum, use it; otherwise, if there is a valid override entry for axis minimum, start counting up from the override minimum in increments of Xmajor, and use the smallest value which is greater than Max&#8217;; otherwise calculate as before.</p>
<p>This example with user overrides may be overkill. But I occasionally find it very useful. This post is my way of saving it to the cloud, so I can find it later in a search engine.
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<A HREF="http://www.exceluser.com/cmd.asp?Clk=1374689"><IMG SRC="http://www.exceluser.com/images/info/pub/info_dash_c02.gif" ALT="Learn how to create Excel dashboards." WIDTH="468" HEIGHT="60" border=0></A><br />
<br /><img src="http://www.exceluser.com/cmd.asp?Imp=1374689" width="0" height="0" border="0"></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Q75STT7nfYYl4RXS7rvLO0fHGo0/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q75STT7nfYYl4RXS7rvLO0fHGo0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q75STT7nfYYl4RXS7rvLO0fHGo0/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q75STT7nfYYl4RXS7rvLO0fHGo0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/peltiertech/EsrO?a=Y142tlAkp5c:_I-GhwBCte8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/peltiertech/EsrO?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/peltiertech/EsrO/~4/Y142tlAkp5c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/calculate-nice-axis-scales-in-your-excel-worksheet/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

