<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Peltier Tech Blog &#187; Formatting</title>
	<atom:link href="http://peltiertech.com/WordPress/category/formatting/feed/" rel="self" type="application/rss+xml" />
	<link>http://peltiertech.com/WordPress</link>
	<description>Peltier Tech Excel Charts and Programming Blog</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:40:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Excel Charts With Horizontal Bands</title>
		<link>http://peltiertech.com/WordPress/excel-charts-with-horizontal-bands/</link>
		<comments>http://peltiertech.com/WordPress/excel-charts-with-horizontal-bands/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 09:00:52 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Formatting]]></category>
		<category><![CDATA[colored bands]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3336</guid>
		<description><![CDATA[You may want to highlight certain ranges of values in a chart, to make it easier to judge the values in the chart. For example, you may want to highlight “good” values with green or blue, and “bad” values with red. Or you may want to highlight the standard deviation bands in a control chart. [...]]]></description>
			<content:encoded><![CDATA[<p>You may want to highlight certain ranges of values in a chart, to make it easier to judge the values in the chart. For example, you may want to highlight “good” values with green or blue, and “bad” values with red. Or you may want to highlight the standard deviation bands in a control chart. This banding is not a native feature of Excel, but you can use standard chart elements (<em>i.e.</em>, stacked columns) to achieve this effect. Read on to learn how.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_Finished.png" alt="Chart With Horizontal Bands" /></p>
<p>This technique works with XY (Scatter), Column, and Line charts, and all of the chart triptychs in this tutorial show these chart types in that left to right order.</p>
<h2>Original Charts and Data</h2>
<p>This screenshot shows the data used in this exercise. Column A has the X values for the XY (Scatter) charts, column B has the X labels for the Column and Line charts, and column C has the Y values for all charts. Column E lists the values at the tops of the bands, from the bottom up, starting with the top of the blank area below the lowest band. Column F has a label for these bands, which I&#8217;ve simply filled with the intended colors of the bands. Columns G and H have the same values, G2:H2 containing the lowest value from F2 (=F2), and the rest of the cells containing the band heights (e.g., =F3-F2). These heights will be used to populate the values of stacked area charts, which will serve as our bands.</p>
<p><span id="more-3336"></span><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_Data.png" alt="Chart With Horizontal Bands - Data" /></p>
<p>Here are the XY (Scatter), Column, and Line charts of our original data.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_Original.png" alt="Original Chart Without Bands" /></p>
<p>You can start with a chart containing your original data, and add the bands, or you can follow a somewhat easier approach which starts from scratch, building a banded chart, then adding the original data. I&#8217;ll start the tutorial with the second approach. Skip ahead to <a href="#addingbands" rel="nofollow" title="Adding Bands to Existing CHart" >Adding Bands to Existing Chart</a> if you are not starting from scratch.</p>
<h2>Starting From Scratch</h2>
<p>Select the data for the bands (the shaded range F1:H8) and create a stacked area chart (not stacked 100% area), with series data in rows. The charts all look the same for a few steps, until we actually have a series thathas either XY, Column, or Line type.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_A01.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>This is as good a time as any to apply your fill colors to the bands. It is best to use light shades, so the bands do not overwhelm the original data.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_A02.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Copy the original data, select your chart, and use paste special to add the data as a new series. It is added as another stacked area series.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_A03.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Change the added series to the desired chart type (XY Scatter, Column, or Line). Now the charts assume their unique appearances.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_A04.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Format the new series and assign it to the secondary axis. This was already done in the first chart when the added series was converted to XY type.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_A05.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Add a secondary horizontal axis to the chart. This was also done in the first chart when the added series was converted to XY type.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_A06.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>The rest of the protocol is the same as for the case where you start with your original chart and add the bands. Skip the next section, and follow the instructions in <a href="#finishing" rel="nofollow" title="Finishing the Chart" >Finishing the Chart</a> below.</p>
<p><a name="addingbands"></a></p>
<h2>Adding Bands to Existing Chart</h2>
<p>Copy the range with the band data (F1:H8 in our example), select the chart, and use Paste Special to add the data as new series, with data in rows.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_B01.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>One by one, change the chart type of the added series to stacked column (not stacked 100% column). This is the step that is so tedious, you&#8217;ll wish you had started from scratch (the above protocol).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_B02.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Apply your fill colors to the bands. It is best to use light shades, so the bands do not overwhelm the original data.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_B03.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Format the original series, and assign it to the secondary axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_B04.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Add a secondary horizontal axis to the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_B05.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p><a name="finishing"></a></p>
<h2>Finishing the Chart</h2>
<p>Format the primary (bottom) horizontal axis so the crossing axis is positioned on tick marks.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_C01.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>The next four steps switch the axes left and right, top and bottom.</p>
<p>Format the primary (left) vertical axis so the crossing axis crosses at the maximum value.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_C02.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Format the secondary (right) vertical axis so the crossing axis crosses at the automatic position.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_C03.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Format the primary (top) horizontal axis so the crossing axis crosses at the maximum category.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_C04.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Format the secondary (bottom) horizontal axis so the crossing axis crosses at the automatic position.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_C05.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>Hide the primary (top) horizontal axis by formatting it so it has no line, no axis ticks, and no tick mark labels. Select the primary (right) vertical axis and press Delete.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_C06.png" alt="Chart With Horizontal Bands - In Progress" /></p>
<p>You were either done in that last step, or you can add a fill color outside (above and below) the bands by formatting hte plot area with the desired fill color.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_Finished.png" alt="Chart With Horizontal Bands - Finished" /></p>
<h2>Negative Data and Charts</h2>
<p>What makes this technique more flexible than that in my original tutorial is that stacked areas can span the horizontal axis without the strange behavior of stacked column charts. To illustrate, here is the same data as above, offset so it spans the horizontal axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_DataNegative.png" alt="Chart With Horizontal Bands - Negative Data" /></p>
<p>Here are the corresponding charts without (top row) and with (bottom row) formatting the plot area to shade above and below the bands.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_Negative.png" alt="Chart With Negative Horizontal Bands" /></p>
<h2>Arbitrary Data and Charts</h2>
<p>In the examples above, the bands are uniform in width, and each band touches the bands on either side without gaps. This isn&#8217;t necessary, of course. The bands can be any width, and there can be gaps between adjacent bands (the gaps being transparent bands). The worksheet below has the same original data as above, but the bands have arbitrary top and bottom values, and there are a couple gaps.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_DataArbitrary.png" alt="Chart With Horizontal Bands - Arbitrary Data" /></p>
<p>The chart doesn&#8217;t care what the band values are or how we format them.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-09/HBand_Arbitrary.png" alt="Chart With Arbitrary Horizontal Bands" />
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  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>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/excel-charts-with-horizontal-bands/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Excel Chart With Irregular Horizontal Bands</title>
		<link>http://peltiertech.com/WordPress/excel-chart-with-irregular-horizontal-bands/</link>
		<comments>http://peltiertech.com/WordPress/excel-chart-with-irregular-horizontal-bands/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 15:10:14 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Formatting]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3314</guid>
		<description><![CDATA[I built an interesting example of the Excel Chart With Horizontal Bands this morning. A user on Excel Forum wanted a way to present soil analysis data, where the typical values for each element tested were very different, and the cutoffs between different ranges of results (i.e., low, medium, high) were not only different, but [...]]]></description>
			<content:encoded><![CDATA[<p>I built an interesting example of the <a href="http://peltiertech.com/WordPress/excel-chart-with-horizontal-bands/"title="Excel Chart With Horizontal Bands" >Excel Chart With Horizontal Bands</a> this morning. A user on <a href="http://www.excelforum.com/newreply.php?do=postreply&amp;t=784332" rel="nofollow" title="Excel Forum - Graph Help" >Excel Forum</a> wanted a way to present soil analysis data, where the typical values for each element tested were very different, and the cutoffs between different ranges of results (i.e., low, medium, high) were not only different, but also not proportional. A single set of bands wouldn&#8217;t work, but we can used stacked columns to generate staggered bands.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_chart5.png" alt="Excel chart with irregular horizontal bands" /></p>
<p>Two blocks of data are shown below. In the range A1:G6, I&#8217;ve entered results and qualitative values for five elements in the soil sample. I made up some of the ranges in the table, and I&#8217;ve already adjusted the maximum values in column G so that the &#8220;Good&#8221; range is roughly aligned across the chart.</p>
<p><span id="more-3314"></span>I skipped a few rows, and put normalized values into A10:G15. I normalized by dividing by the value in the High column, and I also adjusted the values in Low through High so they show the normalized width of each step. This makes the sum of the values from Very Low to High equal to 1, and relates the new results value to a fraction of the High value.</p>
<p>While I was at it, I combined the element name and result, so the result will appear in the chart labels.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_data.png" alt="Sample results and qualitative value ranges" /></p>
<p>The formulas in the first row of this normalized table, which are filled down through all rows of the table, are:</p>
<p style="padding-left: 60px;">A11: <tt class="tt">=A2&amp;" ("&amp;TEXT(B2,"0.00")&amp;")"<br />
</tt>B11: <tt class="tt">=B2/$G2<br />
</tt>C11: <tt class="tt">=C2/$G2<br />
</tt>D11: <tt class="tt">=(D2-C2)/$G2<br />
</tt>E11: <tt class="tt">=(E2-D2)/$G2<br />
</tt>F11: <tt class="tt">=(F2-E2)/$G2<br />
</tt>G11: <tt class="tt">=(G2-F2)/$G2</tt></p>
<p>Once you enter the formula in D11, you can fill it into E11:G11.</p>
<p>Now the fun begins. Select this normalized data range and create a stacked column chart. In Excel 2003 and earlier, in step 2 of the Chart Wizard, select the Series in Columns option. In Excel 2007 and later, you just have to let Excel make the chart wrong, then on the Chart Tools &gt; Design tab, click Switch Rows and Columns.</p>
<p>This produces the chart below. I&#8217;ve already color coded the Very Low through High series to have light fills that will indicate these ranges in the final chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_chart1.png" alt="Excel chart with irregular horizontal bands - Step 1" /></p>
<p>The next thing is to format the Result series, moving it to the secondary axis, as shown below.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_chart2.png" alt="Excel chart with irregular horizontal bands - Step 2" /></p>
<p>Now delete the secondary vertical axis on the right of the chart, so all data uses the primary axis. At the same time, change the scale of the primary vertical axis so its maximum is 1.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_chart3.png" alt="Excel chart with irregular horizontal bands - Step 3" /></p>
<p>Format the primary vertical axis to hide it and its labels (i.e., no line, no axis ticks, no axis tick labels in the dialog).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_chart4.png" alt="Excel chart with irregular horizontal bands - Step 4" /></p>
<p>Finally, Format one of the Very Low to High series (it doesn&#8217;t matter which one because they will all follow), reducing its gap width to zero.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2011-07/ExcelForum_784332_chart5.png" alt="Excel chart with irregular horizontal bands - Finished" />
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  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>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/excel-chart-with-irregular-horizontal-bands/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Text Labels on a Vertical Column Chart in Excel</title>
		<link>http://peltiertech.com/WordPress/text-labels-on-vertical-axis-in-excel-column-chart/</link>
		<comments>http://peltiertech.com/WordPress/text-labels-on-vertical-axis-in-excel-column-chart/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 07:00:47 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Formatting]]></category>
		<category><![CDATA[Axis Labels]]></category>
		<category><![CDATA[Combination Charts]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3248</guid>
		<description><![CDATA[When analyzing survey results, for example, there may be a numerical scale that has associated text labels. This may be a scale of 1 to 5 where 1 means &#8220;Completely Dissatisfied&#8221; and 5 means &#8220;Completely Satisfied&#8221;, with other labels in between. The data can be plotted by value, but it&#8217;s not obvious how to place [...]]]></description>
			<content:encoded><![CDATA[<p>When analyzing survey results, for example, there may be a numerical scale that has associated text labels. This may be a scale of 1 to 5 where 1 means &#8220;Completely Dissatisfied&#8221; and 5 means &#8220;Completely Satisfied&#8221;, with other labels in between. The data can be plotted by value, but it&#8217;s not obvious how to place the text labels on the chart in place of the numerical labels on the vertical axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col08.png" alt="Text Labels on a Vertical Column Chart" /></p>
<p>There are several ways to accomplish this task. In this tutorial I&#8217;ll show how to use a combination bar-column chart, in which the columns show the survey results and the bars provide the text labels for the horizontal axis. The steps are essentially the same in Excel 2007 and in Excel 2003. I&#8217;ll show the charts from Excel 2007, and the different dialogs for both where applicable.</p>
<p><span id="more-3248"></span>Let&#8217;s assume the following dummy survey results.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/SurveyColData.png" alt="Data for column chart" /></p>
<p>Plot the responses for each question (the first two columns of the data) in a clustered column chart, and use the Error column as <a href="http://peltiertech.com/WordPress/custom-error-bars-in-excel-charts/"title="Custom Error Bars in Excel Charts" >custom error bar values</a>.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col01.png" alt="Col Chart (Step 1)" /></p>
<p>So far so good. Note that I&#8217;ve violated the first rule of column chart value axis scales, which is that <strong>The Axis Scale Must Include Zero</strong>. However, the minimum possible score here is 1, and we&#8217;ll be using text labels. In our chart, fixing the scale at 1 to 5 makes sense.</p>
<p>Here is the data for the text labels. Rating 1 may stand for &#8220;Totally Lame&#8221; and Rating 5 for &#8220;Totally Awesome&#8221;. I chose the Dummy values of 2 just so the data would show up in the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/SurveyLabels.png" alt="Data for text labels" /></p>
<p>Copy this table above, select the chart, and use Paste Special to add the data to the chart using the settings below (the Excel 2007 dialog is very much like this Excel 2003 dialog).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/ChartPasteSpecial.png" alt="Chart Paste Special Dialog" /></p>
<p>We now have two sets of columns in the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col02.png" alt="Col Chart (Step 2)" /></p>
<p>Right click on the new series, choose &#8220;Change Chart Type&#8221; (&#8220;Chart Type&#8221; in 2003), and select the clustered bar style.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col03.png" alt="Bar Chart (Step 3)" /></p>
<p>There are no Rating labels because there  is no secondary vertical axis, so we have to add this axis by hand. On the Excel 2007 Chart Tools &gt; Layout tab, click Axes, then Secondary Horizontal Axis, then Show Left to Right Axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/ChartLayoutAxesCol2007.png" alt="Chart Tools - Layout Tab - Axes - Excel 2007" /></p>
<p>In Excel 2003 go to the Chart menu, choose Chart Options, and check the Category (X) Axis checkmark.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/ChartOptionsAxesCol2003.png" alt="Chart Options - Axes - Excel 2003" /></p>
<p>Now the chart has four axes.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col04.png" alt="Col Chart (Step 4)" /></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">We want the Rating labels at the left side of the chart, and we&#8217;ll place the numerical axis at the right before we hide it. In turn, select the bottom and top vertical axes.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">In the Excel 2007 Format Axis dialog, the bottom axis will be set so the vertical axis crosses at the automatic setting, and the top axis so the vertical axis crosses at the maximum category. Switch the settings of the top and bottom axes.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/AxisCrossesAtCol2007.png" alt="Format Axis Dialog - Axis Crosses At - Excel 2007" /></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">In the Excel 2003 Format Axis dialog, the maximum category checkbox checked for the top axis and unchecked for the bottom axis. Change the setting for the top and bottom axes.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/AxisCrossesAt2003.png" alt="Format Axis Dialog - Axis Crosses At - Excel 2003" /></p>
<p>Now we have the axes where we want them.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col05.png" alt="Col Chart (Step 5)" /></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">Hide the dummy series by setting its fill color to no fill.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col06.png" alt="Col Chart (Step 6)" /></p>
<p>Hide the top and right axes by selecting &#8220;None&#8221; for axis tick marks and tick labels, and &#8220;No Line&#8221; for the axis line itself.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col07.png" alt="Col Chart (Step 7)" /></p>
<p>In Excel 2007 (not in Excel 2003) the Rating labels may have been squished. Select the plot area, and drag its left edge inwards to make room for the labels.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col07a.png" alt="Col Chart (Step 7a)" /></p>
<p>The Rating labels are still not properly aligned, but this is easy to fix.</p>
<p>Format the vertical axis, and change the Position Axis setting of the horizontal axis from &#8220;Between Tick Marks&#8221; to &#8220;On Tick Marks&#8221;.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/PositionAxisCol2007.png" alt="Format Axis Dialog - Position Axis - Excel 2007" /></p>
<p>In the Excel 2003 Format Axis dialog, uncheck the &#8220;Value Axis Crosses Between Categories&#8221; checkbox.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/PositionAxis2003.png" alt="Format Axis Dialog - Position Axis - Excel 2003" /></p>
<p>Finally we have our chart with text labels along the survey response (vertical) axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col08.png" alt="Column Chart with Value Axis Text Labels" /></p>
<p>See <a href="http://peltiertech.com/WordPress/text-labels-on-horizontal-axis-in-excel-bar-chart"title="Text Labels on a Horizontal Bar Chart in Excel" >Text Labels on a Horizontal Bar Chart in Excel</a> to see how to get the text labels onto the horizontal axis of a bar chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar08.png" alt="Text Labels on a Horizontal Bar Chart" /></p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  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>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/text-labels-on-vertical-axis-in-excel-column-chart/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Text Labels on a Horizontal Bar Chart in Excel</title>
		<link>http://peltiertech.com/WordPress/text-labels-on-horizontal-axis-in-excel-bar-chart/</link>
		<comments>http://peltiertech.com/WordPress/text-labels-on-horizontal-axis-in-excel-bar-chart/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 07:00:27 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Formatting]]></category>
		<category><![CDATA[Axis Labels]]></category>
		<category><![CDATA[Combination Charts]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3247</guid>
		<description><![CDATA[When analyzing survey results, for example, there may be a numerical scale that has associated text labels. This may be a scale of 1 to 5 where 1 means &#8220;Completely Dissatisfied&#8221; and 5 means &#8220;Completely Satisfied&#8221;, with other labels in between. The data can be plotted by value, but it&#8217;s not obvious how to place [...]]]></description>
			<content:encoded><![CDATA[<p>When analyzing survey results, for example, there may be a numerical scale that has associated text labels. This may be a scale of 1 to 5 where 1 means &#8220;Completely Dissatisfied&#8221; and 5 means &#8220;Completely Satisfied&#8221;, with other labels in between. The data can be plotted by value, but it&#8217;s not obvious how to place the text labels on the chart in place of the numerical labels on the horizontal axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar08.png" alt="Text Labels on a Horizontal Bar Chart" /></p>
<p>There are several ways to accomplish this task. In this tutorial I&#8217;ll show how to use a combination bar-column chart, in which the bars show the survey results and the columns provide the text labels for the horizontal axis. The steps are essentially the same in Excel 2007 and in Excel 2003. I&#8217;ll show the charts from Excel 2007, and the different dialogs for both where applicable.</p>
<p><span id="more-3247"></span>Let&#8217;s assume the following dummy survey results. I&#8217;ve sorted the list in reverse order to work around the phenomenon described in <a href="http://peltiertech.com/WordPress/bar-chart-categories-backwards/"title="Why Are My Excel Bar Chart Categories Backwards?" >Why Are My Excel Bar Chart Categories Backwards?</a></p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/SurveyBarData.png" alt="Data for bar chart" /></p>
<p>Plot the responses for each question (the first two columns of the data) in a clustered bar chart, and use the Error column as <a href="http://peltiertech.com/WordPress/custom-error-bars-in-excel-charts/"title="Custom Error Bars in Excel Charts" >custom error bar values</a>.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar01.png" alt="Bar Chart (Step 1)" /></p>
<p>So far so good, except that the end cap of the Question 3 upper error bar is apparently hidden by the plot area border (it appears properly in 2003). Note that I&#8217;ve violated the first rule of bar chart value axis scales, which is that <strong>The Axis Scale Must Include Zero</strong>. However, the minimum possible score here is 1, and we&#8217;ll be using text labels. In our chart, fixing the scale at 1 to 5 makes sense.</p>
<p>Here is the data for the text labels. Rating 1 may stand for &#8220;Totally Lame&#8221; and Rating 5 for &#8220;Totally Awesome&#8221;. I chose the Dummy values of 2 just so the data would show up in the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/SurveyLabels.png" alt="Data for text labels" /></p>
<p>Copy this table above, select the chart, and use Paste Special to add the data to the chart using the settings below (the Excel 2007 dialog is very much like this Excel 2003 dialog).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/ChartPasteSpecial.png" alt="Chart Paste Special Dialog" /></p>
<p>We now have two sets of bars in the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar02.png" alt="Bar Chart (Step 2)" /></p>
<p>Right click on the new series, choose &#8220;Change Chart Type&#8221; (&#8220;Chart Type&#8221; in 2003), and select the clustered column style.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar03.png" alt="Bar Chart (Step 3)" /></p>
<p>In Excel 2003 the chart has a Ratings labels at the top of the chart, because it has secondary horizontal axis. Excel 2007 has no Ratings labels or secondary horizontal axis, so we have to add the axis by hand. On the Excel 2007 Chart Tools &gt; Layout tab, click Axes, then Secondary Horizontal Axis, then Show Left to Right Axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/ChartLayoutAxesBar2007.png" alt="Chart Tools - Layout Tab - Axes - Excel 2007" /></p>
<p>Now the chart has four axes.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar04.png" alt="Bar Chart (Step 4)" /></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">We want the Rating labels at the bottom of the chart, and we&#8217;ll place the numerical axis at the top before we hide it. In turn, select the left and right vertical axes.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">In the Excel 2007 Format Axis dialog, the left axis will be set so the horizontal axis crosses at the automatic setting, and the right axis so the horizontal axis crosses at the maximum category. Switch the settings of the left and right axes.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/AxisCrossesAtBar2007.png" alt="Format Axis Dialog - Axis Crosses At - Excel 2007" /></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">In the Excel 2003 Format Axis dialog, the maximum category checkbox checked for the right axis and unchecked for the left axis. Change the setting for each vertical axis.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;"><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/AxisCrossesAt2003.png" alt="Format Axis Dialog - Axis Crosses At - Excel 2003" /></p>
<p>Now we have the axes where we want them.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar05.png" alt="Bar Chart (Step 5)" /></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 18px; margin-left: 0px; padding: 0px;">Hide the dummy series by setting its fill color to no fill.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar06.png" alt="Bar Chart (Step 6)" /></p>
<p>Hide the top and right axes by selecting &#8220;None&#8221; for axis tick marks and tick labels, and &#8220;No Line&#8221; for the axis line itself.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar07.png" alt="Bar Chart (Step 7)" /></p>
<p>The Rating labels are not properly aligned, but this is easy to fix.</p>
<p>Format the horizontal axis, and in Excel 2007 change the Position Axis setting of the vertical axis from &#8220;Between Tick Marks&#8221; to &#8220;On Tick Marks&#8221;.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/PositionAxisBar2007.png" alt="Format Axis Dialog - Position Axis - Excel 2007" /></p>
<p>In the Excel 2003 Format Axis dialog, uncheck the &#8220;Value Axis Crosses Between Categories&#8221; checkbox.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/PositionAxis2003.png" alt="Format Axis Dialog - Position Axis - Excel 2003" /></p>
<p>Finally we have our chart with text labels along the survey response (horizontal) axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Bar08.png" alt="Bar Chart with Value Axis Text Labels" /></p>
<p>I noted before that the error bar cap is not obscured in Excel 2003, and here&#8217;s proof.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2003Bar08.png" alt="Bar Chart with Value Axis Text Labels" /></p>
<p>See <a href="http://peltiertech.com/WordPress/text-labels-on-vertical-axis-in-excel-column-chart"title="Text Labels on a Vertical Column Chart in Excel" >Text Labels on a Vertical Column Chart in Excel</a> to see how to get the text labels onto the vertical axis of a column chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/TextLabel2007Col08.png" alt="Text Labels on a Vertical Column Chart" /></p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  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>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/text-labels-on-horizontal-axis-in-excel-bar-chart/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Invert if Negative in Excel 2007</title>
		<link>http://peltiertech.com/WordPress/invert-if-negative-excel-2007/</link>
		<comments>http://peltiertech.com/WordPress/invert-if-negative-excel-2007/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 07:00:29 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Formatting]]></category>
		<category><![CDATA[Excel 2007]]></category>
		<category><![CDATA[invert if negative]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3242</guid>
		<description><![CDATA[In Invert Excel Chart Format if Negative I showed the technique that allows you to select which colors for positive and negative points in a column or bar chart. This technique works in Excel versions up to and including Excel 2003, but doesn&#8217;t work in Excel 2007. Up until now I thought you couldn&#8217;t get [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://peltiertech.com/Excel/ChartsHowTo/InvertIfNegative.html" rel="nofollow" title="Invert Excel Chart Format if Negative" >Invert Excel Chart Format if Negative</a> I showed the technique that allows you to select which colors for positive and negative points in a column or bar chart. This technique works in Excel versions up to and including Excel 2003, but doesn&#8217;t work in Excel 2007. Up until now I thought you couldn&#8217;t get two colors of your own choosing in Excel 2007 unless you used two series, or colored each point manually or programmatically based on its value.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invert04.png" alt="Column Chart with Invert if Negative Setting" /></p>
<p>Well, I was wrong. Invert if Negative can be used with any two arbitrary colors in Excel 2007. You just need to know the trick.</p>
<p><span id="more-3242"></span>In my <a href="http://peltiertech.com/WordPress/area-chart-invert-if-negative/"title="Area Chart – Invert if Negative" >Area Chart – Invert if Negative</a> post, I went through a convoluted protocol to color an area chart differently for positive and negative areas. In a comment under that post, alert reader <strong>Vincent</strong> wrote the following, speaking of column and bar charts:</p>
<blockquote><p>I have been looking for an option in Excel 2007 to do the invert if negative option just like I did in 2003. On every website it states that it cannot be done unless you use two series. I couldn’t.</p>
<p>Then I found this:<br />
 <a href="http://www.hichert.com/de/community/foren?func=view&amp;catid=6&amp;id=150"rel="nofollow" >http://www.hichert.com/de/community/foren?func=view&amp;catid=6&amp;id=150</a></p>
<p>It works! And I like to share this with all of you looking for this solution!</p>
</blockquote>
<p>The protocol uses Excel 2007&#8242;s gradient fill formatting of the bars, with an unusual and nonintuitive gradient definition. This tutorial is a reworking of the technique described by <a href="http://http://www.istudio.si/" rel="nofollow" >Andrej Lapajne</a> in the citation above.</p>
<h2>The Chart</h2>
<p>Let&#8217;s start with a simple column chart using arbitrary positive and negative values. Never mind for this exercise the category labels located in the negative bars.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invert01.png" alt="Column Chart without Invert if Negative Setting" /></p>
<h2>Invert if Negative in Excel 2007 Dialog</h2>
<p>We can invoke Invert if Negative using the checkbox in the Fill panel of the Format Data Series dialog in Excel 2007.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invertdlg01.png" alt="Excel 2007 Dialog Showing Invert if Negative Setting" /></p>
<p>What we get is the same as the initial Invert if Negative chart in Excel 2003: the positive bars stay the same, the negative bars are filled with white. Excel 2007 adds the border, otherwise the bars would not be visible. The technique that adds a second color in Excel 2003 fails in Excel 2007.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invert02.png" alt="Column Chart with Invert if Negative Setting" /></p>
<h2>Gradient Fill Formats</h2>
<p>In general, applying a gradient fill pattern in a chart adds that special kind of chart junk that attracts attention while obscuring the data. However, this technique requires the gradient feature, though by the end there will be no gradient, just two colors of bars.</p>
<p>Let&#8217;s make a simple gradient, defined by two &#8220;stops&#8221;, that is, the colors at the two endpoints. Select the Gradient Fill option, then set Stop 1 at position 0% to show the first color, green for positive.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invertdlg02.png" alt="Excel 2007 Dialog Showing Simple Gradient Step 1" /></p>
<p>Set Stop 2 at position 100% with the second color, red for negative.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invertdlg03.png" alt="Excel 2007 Dialog Showing Simple Gradient Step 2" /></p>
<p>What we get is the default gradient, changing gradually from green to red. Invert if Negative has been checked, so the positive and negative bars show the gradient in opposite directions.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invert03.png" alt="Column Chart with Simple Gradient and Invert if Negative Setting" /></p>
<h2>The Magical Gradient</h2>
<p>I have to admit that I do not understand why this magical gradient works. If I did, I probably wouldn&#8217;t call it magical. Mr. Lapajne is either a genius or a madman, or perhaps he swiped the gradient from another genius or madman like I&#8217;ve swiped it from him. In any case, the gradient requires four stops, described below:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invertgradient.png" alt="Gradient Settings for Invert if Negative" /></p>
<p>Where do the 1% and 99% stops come from? I don&#8217;t know, and it must have taken a madman or someone with finely honed obsessive-compulsive disorder to have determined them. For &#8220;fun&#8221;, I experimented with a wide variety of similar and different settings, and I would never have found the correct ones, even by accident.</p>
<p>The result is just what we hoped for, green bars for positive values, red for negative values.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-12/invert04.png" alt="Column Chart with Funky Gradient and Invert if Negative Setting" /></p>
<h2>Why Haven&#8217;t I Been Writing?</h2>
<p>Good question. I&#8217;ve been busy and distracted.</p>
<p>Last week I had the honor of addressing the 5th annual <a href="http://www.kluwerfinancieelmanagement.nl/excelexperienceday/" rel="nofollow" title="Excel Experience Day" >Excel Experience Day</a>, sponsored by Dutch publishing and information services provider <a href="http://home.kluwer.nl/kluwer/portal_klnl/over_kluwer" rel="nofollow" title="Kluwer" >Kluwer</a>. In the morning I spoke about making effective visualizations in Excel, dispensing with the usual tedious &#8220;Do this &#8211; Don&#8217;t do that&#8221; approach in favor of a discussion of human visual and cognitive systems. Knowing a bit about these systems makes it easier to understand the rules for effective visual presentations. In the afternoon I led a couple plenary sessions that dealt more specifically with what to do in Excel, following on my earlier discussion of human cognition, and getting into the rules. The day after Excel Experience Day was <strong>Excel Experts Day</strong>, where I split a day of hands-on training with my colleague and fellow Microsoft Excel MVP <a href="http://www.jkp-ads.com/" rel="nofollow" title="Jan Karel Pieterse - Application Development Services" >Jan Karel Pieterse</a>, who has graced the Excel world with such useful, in fact, indispensable utilities as the <a href="http://www.jkp-ads.com/OfficeMarketPlaceNM-EN.asp" rel="nofollow" title="Name Manage Utility" >Name Manager</a> and <a href="http://www.jkp-ads.com/downloadscript.asp?filename=autosafe.zip" rel="nofollow" title="AutoSafe Utility" >AutoSafe</a>. I had nothing but positive experiences in Holland and in all of my interactions with the Dutch people, despite having only a working knowledge of English and no ability to speak Dutch.</p>
<p>Over the past few months I have not spent my customary hour a day on my blog. It dawned on me recently that this hour has been spent practicing guitar, which I&#8217;m still not very good at, but which is still a lot of fun. I&#8217;m going to have to find another hour somewhere so I can do both. I&#8217;d sacrifice an hour of sleep, but already I&#8217;m not getting enough of that.</p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  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>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/invert-if-negative-excel-2007/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>High-Low Line Alternatives in Excel Charts</title>
		<link>http://peltiertech.com/WordPress/high-low-line-alternatives-in-excel-charts/</link>
		<comments>http://peltiertech.com/WordPress/high-low-line-alternatives-in-excel-charts/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 07:00:31 +0000</pubDate>
		<dc:creator>Jon Peltier</dc:creator>
				<category><![CDATA[Formatting]]></category>
		<category><![CDATA[error bars]]></category>
		<category><![CDATA[High-Low Lines]]></category>

		<guid isPermaLink="false">http://peltiertech.com/WordPress/?p=3117</guid>
		<description><![CDATA[High-low lines are a feature of Excel line charts that connect the high and low points at a given category. For example, in a stock chart the high-low lines connect the high and low value for each date in the chart. A high-low line connects the highest of the values for a given category to [...]]]></description>
			<content:encoded><![CDATA[<p>High-low lines are a feature of Excel line charts that connect the high and low points at a given category. For example, in a stock chart the high-low lines connect the high and low value for each date in the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-ohlc.png" alt="Stock Chart with High Low Lines and Open-Close Ticks" /></p>
<p>A high-low line connects the highest of the values for a given category to the lowest of the values at that same category. All that is needed is two or more series with a point at that category.</p>
<p>If there are line series on primary and secondary axes, then you can have high-low lines for the primary axis group of series, and an independent set of high-low lines for the secondary axis group.</p>
<h2><span id="more-3117"></span>Connecting Any Two Points With High-Low Lines</h2>
<p>An Excel user emailed me with a question: How can I connect any two points with high-low lines?</p>
<p>The user did not provide context for this question, so I&#8217;ve invented my own context.</p>
<p>Suppose I have two sets of points I want to use for high-low lines, and I want to plot two other series to show how (or whether) they fit within the limits defined by these high-low lines. The following data shows data for the two lines to be connected (Connect 1 and 2) and the two series to be compared (Series 1 and 2).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-data1.png" alt="Data for the Arbitrary High-Low Lines" /></p>
<p>Here are these four series in a line chart:</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-lines1.png" alt="Line Chart for the Arbitrary High-Low Lines" /></p>
<p>When high-low lines are added, they do not automatically connect the two series we want connected. The high-low lines connect the highest and lowest points, just like the name implies.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-lines2.png" alt="Line Chart with non-Arbitrary High-Low Lines" /></p>
<p>Excel is nothing if not flexible, and there are at least three ways to accomplish the goal of connecting only the Connect 1 and 2 series with high-low lines.</p>
<h2>Adding High-Low Lines to an Excel Chart</h2>
<p>In Excel 2003 and earlier it is easy and straightforward to add high-low lines to a set of line chart series. Double click any of them to open the Format Series dialog. Click on the Options tab, and check the High-Low Lines box. The high-low lines are automatically assigned to all series in the same axis group.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-2003.png" alt="Adding High-Low Lines in Excel 2003" /></p>
<p>In Excel 2007 adding high-low lines is a bit more obscure. Select the series, then go to the Chart Tools &gt; Layout tab. Over towards the right, in the Analysis group, click Lines, then High-low Lines.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-2007.png" alt="Adding High-Low Lines in Excel 2007" /></p>
<p>High-low lines can be formatted the same way as any other line elements in a chart.</p>
<h2>Arbitrary High-Low Lines Using Secondary Axis</h2>
<p>Move Series 1 and Series 2 to the secondary axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-secondaxis1.png" alt="Arbitrary High-Low Lines via Secondary Axis" /></p>
<p>Delete the secondary Y axis (Excel usually doen&#8217;t give us a secondary X axis if the chart types are the same). This keeps the series in separate axis groups, but all series use the existing axis scales.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-secondaxis2.png" alt="Arbitrary High-Low Lines via Secondary Axis" /></p>
<p>Add high-low lines to Connect 1 and 2 on the primary axis. These lines now ignore Series 1 and 2.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-secondaxis3.png" alt="Arbitrary High-Low Lines via Secondary Axis" /></p>
<p>Format as desired. I&#8217;ve used the high-low lines to indicate a range within which Series 1 and 2 values might be expected to lie.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-secondaxis4.png" alt="Arbitrary High-Low Lines via Secondary Axis" /></p>
<h2>Arbitrary High-Low Lines Using XY Series</h2>
<p>High-low lines only connect line chart series, while ignoring XY and other series. We exploit this behavior by changing Series 1 and 2 to XY chart type series.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-xy1.png" alt="Arbitrary High-Low Lines via XY Series" /></p>
<p>Delete the secondary axis, or better yet, move Series 1 and 2 to the primary axis.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-xy2.png" alt="Arbitrary High-Low Lines via XY Series" /></p>
<p>Add high-low lines to Connect 1 and 2.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-xy3.png" alt="Arbitrary High-Low Lines via XY Series" /></p>
<p>And format as required.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-xy4.png" alt="Arbitrary High-Low Lines via XY Series" /></p>
<h2>High-Low Lines Using Error Bars</h2>
<p>You can use Y error bars to simulate high-low lines. You need to add a column to the data table which has the difference between Connect 2 and Connect 1. This column will be used for custom error bar values.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-data2.png" alt="Data for the Arbitrary High-Low Lines" /></p>
<p>No need to change any series chart types or move series between axes. Just add error bars to Connect 1 using the added Delta column above as positive Y custom values.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-errorbar1.png" alt="Arbitrary High-Low Lines via Error Bars" /></p>
<p>Hide Connect 1 and 2 (format with no markers and no lines). In fact, Connect 2 doesn&#8217;t even need to be in the chart.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-errorbar2.png" alt="Arbitrary High-Low Lines via Error Bars" /></p>
<p>Error bars can be formatted like any other line element, so format away.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-errorbar3.png" alt="Arbitrary High-Low Lines via Error Bars" /></p>
<h2>Adding Error Bars to an Excel Chart</h2>
<p>I&#8217;ve covered error bars in <a href="http://peltiertech.com/WordPress/error-bars-in-excel-2007/"title="Error Bars in Excel 2007 Charts » Peltier Tech Blog" >Error Bars in Excel 2007 Charts</a>. It&#8217;s straightforward in Excel 2003 and earlier, but remarkably obscure in Excel 2007. Progress, eh?</p>
<p>I didn&#8217;t just describe the Excel 2007 error bar aggravation in the article above. I built an add-in to make error bars easier to create in 2007. The add-in works in Excel 2007 but also in earlier versions. You can download the add-in from a link near the end of the article.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/ErrorBarDialog.png" alt="Dialog for Peltier Tech Error Bar Utility" /></p>
<h2>High-Low Line Alternative Without Lines</h2>
<p>I&#8217;m not sure why the user wanted high-low lines to apply to only some series in the chart. Possibly he was adding a data series to a stock chart, some kind of market index, and it was changing the high-low lines for his stock data. I covered this problem in <a href="http://peltiertech.com/WordPress/stock-charts-in-excel-2007/"title="Stock Charts in Excel 2007 » Peltier Tech Blog" >Stock Charts in Excel 2007</a>.</p>
<p>If the high-low lines are there to indicate for example an acceptable range for Series 1 and 2, keeping the Connect 1 and 2 lines might help delineate the limits defined by the high-low lines.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-secondaxis4a.png" alt="Arbitrary High-Low Lines via Secondary Axis" /></p>
<p>But all these lines are a distracting way to indicate a particular range on a chart. Why not build a shaded region to do this?</p>
<p>Change the data for Connect 2 so it uses the Delta column, then convert Connect 1 and 2 into stacked area chart type series.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-area1.png" alt="High-Low Line Replacement via Area Chart Series" /></p>
<p>If desired change the X axis so the Y axis crosses &#8220;between categories&#8221; (2003) or &#8220;between tick marks&#8221; (2007).</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-area2.png" alt="High-Low Line Replacement via Area Chart Series" /></p>
<p>Format Connect 1 so it&#8217;s invisible (no border, no fill), then remove the border of Connect 2 and use a light shade for its fill.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://peltiertech.com/images/2010-03/highlow-area3.png" alt="High-Low Line Replacement via Area Chart Series" /></p>
<p>Peltier Technical Services, Inc., Copyright © 2011.<br /> <br /><span style="font: 80% Verdana,Tahoma,Arial,sans-serif;">Licensed under a <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" rel="nofollow" rel="license" >Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.<br /> <br />
<a href="http://peltiertech.com/Utility/" rel="nofollow"  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>
]]></content:encoded>
			<wfw:commentRss>http://peltiertech.com/WordPress/high-low-line-alternatives-in-excel-charts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

