<?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>Bacon Bits: &#187; Number Formatting</title>
	<atom:link href="http://datapigtechnologies.com/blog/index.php/tag/number-formatting/feed/" rel="self" type="application/rss+xml" />
	<link>http://datapigtechnologies.com/blog</link>
	<description>A DataPig Technologies Blog</description>
	<lastBuildDate>Wed, 08 Sep 2010 12:25:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Forcing Trailing Negatives</title>
		<link>http://datapigtechnologies.com/blog/index.php/forcing-trailing-negatives/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/forcing-trailing-negatives/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:27:51 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Number Formatting]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Number Formatting]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=1075</guid>
		<description><![CDATA[Argento writes and asks:
"How can I produce numbers with minus symbol at the end of the number?"

In other words, Argento wants to show his numbers with trailing negatives. That is to say, instead of showing -125, he needs to show his numbers as 125-.
I'm not an accountant, so I never really understood why anyone would want [...]]]></description>
			<content:encoded><![CDATA[<p>Argento writes and asks:</p>
<p><em>"How can I produce numbers with minus symbol at the end of the number?"<br />
</em></p>
<p>In other words, Argento wants to show his numbers with trailing negatives. That is to say, instead of showing -125, he needs to show his numbers as 125-.</p>
<p>I'm not an accountant, so I never really understood why anyone would want to see trailing negatives. To me, it just looks as though you keep forgetting to finish writing your math problem.</p>
<p>Nevertheless, you can force trailing negatives easily with a custom number formatting.</p>
<p> <span id="more-1075"></span></p>
<p>First, highlight the numbers you are working with.</p>
<p>Then right-click and select Format Cells.</p>
<p>When the Format Cells dialog box opens, enter this as a custom format:</p>
<p><span style="font-size:12pt"><strong>#,##0;#,##0-<br />
</strong></span></p>
<p>This tells Excel to represent negative numbers with the number itself and a minus symbol at the end of the number.<span style="font-size:12pt"><strong><br />
</strong></span></p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/10/100509_1327_ForcingTrai1.png" alt="" /></p>
<p> </p>
<p>The result is a cosmetic effect that represents negative numbers with a trailing minus symbol.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/10/100509_1327_ForcingTrai2.png" alt="" /></p>
<p> </p>
<p>There you go Argento. No need to thank me with a box of cookies in the mail (preferably before Halloween).</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/" rel="bookmark" class="crp_title">Suppressing Zeros in Chart Labels</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/using-bullet-points-in-excel/" rel="bookmark" class="crp_title">Using Bullet Points in Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/finding-a-more-acceptabl-green/" rel="bookmark" class="crp_title">Finding a More Acceptable Green</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/forcing-number-formatting-in-a-pivot-table/" rel="bookmark" class="crp_title">Forcing Number Formatting in a Pivot Table</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/padding-numbers-with-zeros/" rel="bookmark" class="crp_title">Padding Numbers with Zeros</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/forcing-trailing-negatives/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Suppressing Zeros in Chart Labels</title>
		<link>http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 11:47:49 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Formatting Tips]]></category>
		<category><![CDATA[Excel Number Formatting]]></category>
		<category><![CDATA[Visualizations]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Number Formatting]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=949</guid>
		<description><![CDATA[Susan writes me and asks if there is a way to suppress zeros in chart labels.
"I have a chart that's dynamic in that I can choose a month that's represented. For each month, and Sales Rep, there are up to 5 possible revenue streams, but not every Sales Rep has revenue for all revenue streams [...]]]></description>
			<content:encoded><![CDATA[<p>Susan writes me and asks if there is a way to suppress zeros in chart labels.</p>
<p><em>"I have a chart that's dynamic in that I can choose a month that's represented. For each month, and Sales Rep, there are up to 5 possible revenue streams, but not every Sales Rep has revenue for all revenue streams each month. Is there a way to remove the zero values from the labels in my chart?"<br />
</em></p>
<p>I want to drive traffic to this site, so I better answer her question.</p>
<p> <span id="more-949"></span></p>
<p><span style="font-size:14pt"><strong>The Problem:<br />
</strong></span></p>
<p>Susan's issue is that not every data point is represented by her sales reps. Here, you'll notice that Kim has no Service Contracts for the month selected.</p>
<p>This not only causes the data label to show ($0), but it also muddles the placement of the Service Contract data label.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/091409_1147_Suppressing1.png" alt="" /></p>
<p> </p>
<p><span style="font-size:14pt"><strong>The Solution:<br />
</strong></span></p>
<p>An easy solution is to use a Number Formatting on the source data so that zeros (0) are suppressed. In this example, the source data is formatted as a currency as shown here:</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/091409_1147_Suppressing2.png" alt="" /></p>
<p> </p>
<p>A close of look at the syntax shows this:</p>
<p><span style="font-size:12pt"><strong>$#,##0;($#,##0)<br />
</strong></span></p>
<p>This is actually two number formats in one. The syntax to the left of the semicolon represents the formatting needed for positive numbers. The syntax to the right of the semicolon represents the formatting needed for negative numbers. As you can see, negative numbers will be wrapped in parentheses with this formatting.</p>
<p> </p>
<p>Now, if we add another semicolon, we tell Excel that we want another format for zeros. Any syntax placed to the right of a second semicolon will represent the formatting for zeros. If we were to use this:</p>
<p><span style="font-size:12pt"><strong>$#,##0_);($#,##0);"n/a"<br />
</strong></span></p>
<p>All zeros would be formatted to show as n/a.</p>
<p>What's interesting is that if we put nothing after the second semicolon, Excel assumes that you don't want to show zeros at all. So this syntax would suppress the showing of zeros altogether.</p>
<p><span style="font-size:12pt"><strong>$#,##0_);($#,##0);<br />
</strong></span></p>
<p> </p>
<p>All you have to do to apply this concept is add a custom format to the source data for your chart.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/091409_1147_Suppressing3.png" alt="" /></p>
<p> </p>
<p>With the custom format in place, you'll notice the Kim's zero doesn't show in either the chart or the source data table.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/091409_1147_Suppressing4.png" alt="" /></p>
<p> </p>
<p>Even more nifty, a quick look a the formula bar shows that the zero is still there.  This means the value in the cell is intact – it's only hidden with the custom format. </p>
<p>This allows the data label to remain effective in case Kim decides to actually get off her butt and start selling Service Contracts.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/handling-different-data-types-with-one-chart/" rel="bookmark" class="crp_title">Handling Different Data Types with One Chart</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/incorporating-analytical-extras-into-your-charts/" rel="bookmark" class="crp_title">Incorporating Analytical Extras into Your Charts</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/forcing-trailing-negatives/" rel="bookmark" class="crp_title">Forcing Trailing Negatives</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/padding-numbers-with-zeros/" rel="bookmark" class="crp_title">Padding Numbers with Zeros</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/excel-2010-data-bars/" rel="bookmark" class="crp_title">Excel 2010 Improvements Week – Data Bars</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using Bullet Points in Excel</title>
		<link>http://datapigtechnologies.com/blog/index.php/using-bullet-points-in-excel/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/using-bullet-points-in-excel/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 11:22:32 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Formatting Tips]]></category>
		<category><![CDATA[Excel Number Formatting]]></category>
		<category><![CDATA[Excel Tips and Tricks]]></category>
		<category><![CDATA[Visualizations]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Number Formatting]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=891</guid>
		<description><![CDATA[Harkem (one of my 12 fans) wrote me recently and asked:
"How can I use bullet points in Excel? Much of my PowerPoint presentations are made of Excel ranges that are copied and pasted as pictures. I remove the gridlines to make it look seamless in PowerPoint. I'd like to be able to use bullet points [...]]]></description>
			<content:encoded><![CDATA[<p>Harkem (one of my 12 fans) wrote me recently and asked:</p>
<p><em>"How can I use bullet points in Excel? Much of my PowerPoint presentations are made of Excel ranges that are copied and pasted as pictures. I remove the gridlines to make it look seamless in PowerPoint. I'd like to be able to use bullet points in Excel to enhance the illusion."<br />
</em></p>
<p>Well Harkem, you've come to the right place. I happen to know the answer.</p>
<p> <span id="more-891"></span></p>
<p>Let's say I want to add bullet points to this list of topics. I could manually type in some asterisks or dashes, but that would be tedious and ugly.</p>
<p>There is a better way.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/090409_1122_UsingBullet1.png" alt="" /></p>
<p> </p>
<p><span style="font-size:12pt"><strong>Step 1: Find a symbol and insert somewhere in your workbook<br />
</strong></span></p>
<p>The first step is to find the symbol that would make an appropriate bullet point. Here I'll choose a diamond.</p>
<p>After you choose the symbol, insert it into any empty cell in your worksheet.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/090409_1122_UsingBullet2.png" alt="" /></p>
<p> </p>
<p><span style="font-size:12pt"><strong>Step 2: Copy the symbol<br />
</strong></span></p>
<p>Highlight the inserted symbol and press Ctrl+C on the keyboard to copy the symboal.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/090409_1122_UsingBullet3.png" alt="" /></p>
<p> </p>
<p><span style="font-size:12pt"><strong>Step 3: Add a Custom Number Format to the target text<br />
</strong></span></p>
<p>Highlight the range of cells you would like the bullet points to be applied, right-click, and then choose Format Cells.</p>
<p>The Format Cells dialog box, you'll add your own custom format.</p>
<p>Here, entered the diamond by pasting the copied symbol. I followed it with a space, then the "at" symbol (@).</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/090409_1122_UsingBullet4.png" alt="" /></p>
<p> </p>
<p>After you confirm the custom number format, you're bullet point will be applied to your text.</p>
<p>The benefit of using this technique is that you can edit the text and Excel will automatically place your bullet point.</p>
<p>Plus, you can copy the format to any range of cells to apply the same bullet points.</p>
<p>I've gone crazy and added all kinds of bullets to my list.  I'm living the dream.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/09/090409_1122_UsingBullet5.png" alt="" /></p>
<p> </p>
<p>There you go Harkem. Now send me some cookies or bacon.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/forcing-trailing-negatives/" rel="bookmark" class="crp_title">Forcing Trailing Negatives</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/finding-ghost-cells-in-excel/" rel="bookmark" class="crp_title">Finding Ghost Cells in Excel</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/incorporating-analytical-extras-into-your-charts/" rel="bookmark" class="crp_title">Incorporating Analytical Extras into Your Charts</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/the-good-and-bad-of-bullet-graphs/" rel="bookmark" class="crp_title">The Good and Bad of Bullet Graphs</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/excel-table-design-best-practices/" rel="bookmark" class="crp_title">Excel Table Design Best Practices</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/using-bullet-points-in-excel/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Handling Different Data Types with One Chart</title>
		<link>http://datapigtechnologies.com/blog/index.php/handling-different-data-types-with-one-chart/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/handling-different-data-types-with-one-chart/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 05:08:24 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Number Formatting]]></category>
		<category><![CDATA[Excel Tips and Tricks]]></category>
		<category><![CDATA[Visualizations]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Formulas]]></category>
		<category><![CDATA[Number Formatting]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=733</guid>
		<description><![CDATA[Ahh…data types; Currency, Number, Percent. What a joy to have such a diverse set of numerical variations designed to make your life hell.
Anyone who has had to handle varying numerical formats knows how tedious it can be to build a reporting structure that can handle all formats.
If you've ever built one chart for Percents, one [...]]]></description>
			<content:encoded><![CDATA[<p>Ahh…data types; Currency, Number, Percent. What a joy to have such a diverse set of numerical variations designed to make your life hell.</p>
<p>Anyone who has had to handle varying numerical formats knows how tedious it can be to build a reporting structure that can handle all formats.</p>
<p>If you've ever built one chart for Percents, one for Currencies, and one for Numbers, then you're reading the right blog post.</p>
<p>Today, I'll to show you a technique that allows one chart to accurately show any data type.</p>
<p> <span id="more-733"></span></p>
<p><span style="font-size:14pt"><strong>The Problem<br />
</strong></span></p>
<p>For this example, I'm using the model shown here in this screenshot.</p>
<p>It's a simple model that uses a ListBox to pull data from a table of metrics into a staging area.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/081209_0508_HandlingDif1.png" alt="" /></p>
<p> </p>
<p> </p>
<p>The idea is to build a chart that responds to changes in the list box.</p>
<p>Here, I've built a chart that uses the values in C4:K4 as the source. As you can see, the chart formatting works fine for a Number metric.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/081209_0508_HandlingDif2.png" alt="" /></p>
<p> </p>
<p>The problem comes in when I choose a Percent metric. You'll notice that when I select Resolution%, the chart Y Axis looks funny.</p>
<p>This is because the range I have my chart connected to is formatted as a Number format.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/081209_0508_HandlingDif3.png" alt="" /></p>
<p> </p>
<p><span style="font-size:14pt"><strong>The Solution<br />
</strong></span></p>
<p>The fix boils down to pointing your chart to a different range of cells, formatted appropriately for the metric selected.</p>
<p>You could do this manually by simply selecting a different range for your chart. The trick is to have Excel do it for you.</p>
<p>The solution is to tie your chart to a dynamic named range that will decide which range to point to.</p>
<p> </p>
<p><span style="font-size:12pt"><strong>Step 1: Tag your data<br />
</strong></span></p>
<p>In preparation for this technique, add an identifier to your data, specifying the appropriate format for each metric.</p>
<p>In this example, I tag Percent metrics in a new field called Type with a P. I tag all Currency metrics with a C. And I tag Number metrics with an N.</p>
<p>You'll notice that in Row 4, I've included the Type field in my staging area. This ensures that when the user selects a metric, the correct type tag will be identified.</p>
<p> </p>
<p>I then add two additional ranges (Rows 5 and 6) that is a copy of my original staging area (Row 4). The difference is that I alter the number formatting so that each format type is represented. In this screenshot, you can see that row 4 is formatted as a Number, row 5 is formatted for Currency, and row 6 is Percent.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/081209_0508_HandlingDif4.png" alt="" /></p>
<p> </p>
<p> </p>
<p><span style="font-size:12pt"><strong>Step 2: Create a Named Range<br />
</strong></span></p>
<p>The next step is to create a named range that will essentially point to the appropriate data range based on the tag type.</p>
<p>Do this, we'll use:</p>
<p><span style="font-size:10pt"><strong>=if(Sheet1!$C$4="N", Sheet1!$D$4:$L$4, if(Sheet1!$C$4="C", Sheet1!$D$5:$L$5, Sheet1!$D$6:$L$6))<br />
</strong></span></p>
<p>This formula basically tells Excel that if the tag type is N then use the Number range, if the tag type is C then use the Currency range, else use the Percent range.</p>
<p> </p>
<p>For this example, I've named my Named Range 'ChartSource'.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/081209_0508_HandlingDif5.png" alt="" /></p>
<p> </p>
<p> </p>
<p><span style="font-size:12pt"><strong>Step 3: Use the Named Range as your Series Value<br />
</strong></span></p>
<p>Edit the chart's data source and change the 'Series values' reference to point to the named range.</p>
<p>In this case, the chart is now pointed to ChartSource.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/081209_0508_HandlingDif6.png" alt="" /></p>
<p> </p>
<p>Once that is done, your chart will keep up with the changes in number formats!</p>
<p> </p>
<p>I know that's a lot to take in, so I've made a sample file available for you to play with.</p>
<p>Check it out: <a href="http://datapigtechnologies.com/downloads/HandlingDataTypes.zip">Download the sample file here</a></p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/" rel="bookmark" class="crp_title">Suppressing Zeros in Chart Labels</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/sending-variable-access-data-to-an-excel-range/" rel="bookmark" class="crp_title">Sending Variable Access Data To An Excel Range</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/forcing-number-formatting-in-a-pivot-table/" rel="bookmark" class="crp_title">Forcing Number Formatting in a Pivot Table</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/incorporating-analytical-extras-into-your-charts/" rel="bookmark" class="crp_title">Incorporating Analytical Extras into Your Charts</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/protecting-vlookups-from-expanding-data/" rel="bookmark" class="crp_title">Protecting VLOOKUPS from Expanding Data</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/handling-different-data-types-with-one-chart/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Finding a More Acceptable Green</title>
		<link>http://datapigtechnologies.com/blog/index.php/finding-a-more-acceptabl-green/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/finding-a-more-acceptabl-green/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 03:10:22 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Formatting Tips]]></category>
		<category><![CDATA[Excel Number Formatting]]></category>
		<category><![CDATA[Excel Tips and Tricks]]></category>
		<category><![CDATA[Visualizations]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Excel Formatting]]></category>
		<category><![CDATA[Number Formatting]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=635</guid>
		<description><![CDATA[While working on a report, I decided to use some awesome custom number formatting.
This screenshot shows how I expertly apply a custom format so that any number greater than 1000 is colored green.
At this point, I'm thinking this is going to be great!


 
 
Unfortunately, this is Excel's idea of green.

 
Now, we all have our opinions, but [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a report, I decided to use some awesome custom number formatting.</p>
<p>This screenshot shows how I expertly apply a custom format so that any number greater than 1000 is colored green.</p>
<p>At this point, I'm thinking this is going to be great!</p>
<p><span id="more-635"></span><br />
<img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/080209_0410_Killingyour1.png" alt="" /></p>
<p> </p>
<p> </p>
<p>Unfortunately, this is Excel's idea of green.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/080209_0410_Killingyour2.png" alt="" /></p>
<p> </p>
<p>Now, we all have our opinions, but I'm telling you this is neon green. No….this is Ghostbusters green; slime green. Dare I say booger green?</p>
<p>To solve my green problem I decided to use a custom color tag instead of a standard VB color.</p>
<p> </p>
<p>The standard VB colors are Black, White, Red, Green, Blue, Yellow, Magenta, and Cyan. These make up the first 8 of Excel's legacy palette (the standard 56 colors that were the default in versions pre-2007).</p>
<p>Although you would typically specify a custom color by name, you can actually call up any one of the 56 colors defined in the standard color palette by number. You see, every color in the standard 56-color palette is represented by a number.</p>
<p>To call up a color by number, you would use [ColorN], where 'N' represents a number from 1 to 56. <strong><br />
</strong> </p>
<p>In this example, I use [Color10] to represent green.</p>
<p>Here is the full syntax that tells Excel to color every number greater than 1000 green:</p>
<p><span style="font-size:12pt"><strong>[Color10][&gt;1000]#,##0.0;[Red]#,##0.0<br />
</strong></span><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/080209_0410_Killingyour3.png" alt="" /></p>
<p> </p>
<p> </p>
<p>As you can see, I get a more acceptable green.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/080209_0410_Killingyour4.png" alt="" /></p>
<p> </p>
<p> </p>
<p>Your next question should be, "how do you know which number represents which color"?</p>
<p>Well, you can run this small macro to get a list of colors and their associated numbers.</p>
<p> </p>
<p><span style="font-family:Courier New"><strong><em>Sub ColorList()<br />
Dim i As Integer<br />
For i = 1 To 56<br />
Cells(i, 1).Interior.ColorIndex = i<br />
Cells(i, 2).Value = i<br />
Next i<br />
End Sub<br />
</em></strong></span></p>
<p> </p>
<p>Running the macro will give you a list similar to the list you see here (although your colors may be different based on your current color palette).<span style="font-family:Courier New"><strong><em><br />
</em></strong></span></p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/08/080209_0410_Killingyour5.png" alt="" /></p>
<p> </p>
<p>There you have it. Go and liberate yourself from booger green.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/a-color-is-not-data/" rel="bookmark" class="crp_title">A Color is Not Data</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/special-characters-are-a-pain-in-the-asterisk/" rel="bookmark" class="crp_title">Special Characters are a Pain in the Asterisk</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/forcing-trailing-negatives/" rel="bookmark" class="crp_title">Forcing Trailing Negatives</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/sort-by-color-in-excel-2003/" rel="bookmark" class="crp_title">Sort by Color in Excel 2003</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/" rel="bookmark" class="crp_title">Suppressing Zeros in Chart Labels</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/finding-a-more-acceptabl-green/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Forcing Number Formatting in a Pivot Table</title>
		<link>http://datapigtechnologies.com/blog/index.php/forcing-number-formatting-in-a-pivot-table/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/forcing-number-formatting-in-a-pivot-table/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 09:44:34 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Number Formatting]]></category>
		<category><![CDATA[Pivot Tables]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Number Formatting]]></category>
		<category><![CDATA[PivotTables]]></category>
		<category><![CDATA[Power Tips]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=512</guid>
		<description><![CDATA[Every now and then, I have to deal with a situation where a normalized dataset makes it difficult to build an appropriate pivot table.
Here's an example:
This dataset contains metrics information for each Market.
Notice a column that identifies the Measure, and a column that specifies the corresponding Value.

Although this is generally a nicely formatted table, you'll [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then, I have to deal with a situation where a normalized dataset makes it difficult to build an appropriate pivot table.</p>
<p>Here's an example:</p>
<p><span id="more-512"></span>This dataset contains metrics information for each Market.</p>
<p>Notice a column that identifies the Measure, and a column that specifies the corresponding Value.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/07/072009_0944_ForcingNumb1.png" alt="" /></p>
<p>Although this is generally a nicely formatted table, you'll notice that some of the measures are meant to be Number format while others are meant to be Percentage.</p>
<p>In the database where this dataset originated, the Values field is a 'Double' data type, so this works.</p>
<p>The problem is that when you create a pivot table out of this dataset, you can't assign two different number formats for the Values field. After all, one field – one number format.</p>
<p>So in this example, trying to set the number format for the percentage measures will also change the format for the measure that are supposed to be straight numbers.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/07/072009_0944_ForcingNumb2.png" alt="" /></p>
<p>My solution was to apply a custom number format that formats any value greater than 1.5 to a number. Any value less than 1.5 will be formatted as a Percent.</p>
<p>Here is the syntax I used: <span style="color:#c00000; font-size:12pt"><strong>[&gt;=1.5]#,##0;[&lt;1.5]0.0%<br />
</strong></span></p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/07/072009_0944_ForcingNumb3.png" alt="" /></p>
<p>The result is that each Measure is now formatted appropriately.</p>
<p><img src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/07/072009_0944_ForcingNumb4.png" alt="" /></p>
<p>Obviously I got a little lucky with the parameters of the situation here. This wouldn't work in all scenarios. But this techniques does open some options .</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/handling-different-data-types-with-one-chart/" rel="bookmark" class="crp_title">Handling Different Data Types with One Chart</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/auto-format-pivottables-to-match-source-data/" rel="bookmark" class="crp_title">Auto Format PivotTables to Match Source Data</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/suppressing-zeros-in-chart-labels/" rel="bookmark" class="crp_title">Suppressing Zeros in Chart Labels</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/adding-visualizations-to-your-pivot-tables/" rel="bookmark" class="crp_title">Adding Visualizations to your Pivot Tables</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/padding-numbers-with-zeros/" rel="bookmark" class="crp_title">Padding Numbers with Zeros</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/forcing-number-formatting-in-a-pivot-table/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Convert Numbers to Military Times in Excel</title>
		<link>http://datapigtechnologies.com/blog/index.php/121/</link>
		<comments>http://datapigtechnologies.com/blog/index.php/121/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 03:36:46 +0000</pubDate>
		<dc:creator>datapig</dc:creator>
				<category><![CDATA[Excel Formatting Tips]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Number Formatting]]></category>
		<category><![CDATA[Time]]></category>

		<guid isPermaLink="false">http://datapigtechnologies.com/blog/?p=121</guid>
		<description><![CDATA[In his last desperate act before taking a handful of Ambien, M. DeRevere asks:
How can I program a cell to accept time formulas without putting the (:) colons between the numbers… if you could format the cell to accept just number such as 2300 and it formats it as 23:00 it would save me sooooo [...]]]></description>
			<content:encoded><![CDATA[<p>In his last desperate act before taking a handful of Ambien, M. DeRevere asks:</p>
<p><em>How can I program a cell to accept time formulas without putting the (:) colons between the numbers… if you could format the cell to accept just number such as 2300 and it formats it as 23:00 it would save me sooooo much time?… HELP</em></p>
<p>Well hold off on the pills M.  Because I'm rockin the Excel skillz , and I happen to know the answer.</p>
<p>M's question revolves around "military" time (the 24 hour clock).  For you civilians out there, 23:00 hours is 11:00 pm in military time.  The trick is to apply some custom number formatting.</p>
<p> <span id="more-121"></span></p>
<p><strong>1.  Highlight the column into which you'll be entering your data. </strong></p>
<p><strong>2.  Bring up the Format Cells dialog box and select the Number tab.</strong></p>
<p><strong>3.  Choose Custom from the Category list.</strong></p>
<p><strong>4.  In the Type field, enter <span style="color: #800000;">00\:00</span></strong></p>
<p><strong> </strong></p>
<p><img class="alignnone size-full wp-image-120" title="FormatMilitaryTime" src="http://datapigtechnologies.com/blog/wp-content/uploads/2009/06/FormatMilitaryNumber.png" alt="FormatMilitaryTime" width="408" height="389" /></p>
<p> </p>
<p>At this point, any number you enter will automatically have a colon inserted into the number  (which I suppose is better than having a number inserted into the colon <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="20" height="20" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://instantrimshot.com/rimshot.swf" /><param name="align" value="middle" /><embed type="application/x-shockwave-flash" width="20" height="20" src="http://instantrimshot.com/rimshot.swf" align="middle" quality="high"></embed></object> ). </p>
<p>There are other ways to convert numbers to military time using formulas and such.  This is probably the easiest way.  </p>
<p>I would note that this is not truly a time format so there is nothing stopping anyone from putting something silly in a cell like 3345.  But for relieving some of the burden of data entry, this techinque  serves the purpose.</p>
<div id="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://datapigtechnologies.com/blog/index.php/ive-got-blog-envy/" rel="bookmark" class="crp_title">Blog Envy</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/getting-kicked-off-of-xbox-live/" rel="bookmark" class="crp_title">Getting Kicked Off Xbox Live</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/mothers-day-psa/" rel="bookmark" class="crp_title">Mother’s Day PSA</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/a-tribute-to-lost/" rel="bookmark" class="crp_title">A Tribute to Lost</a></li><li><a href="http://datapigtechnologies.com/blog/index.php/integrating-xcelsius-with-excel-and-access/" rel="bookmark" class="crp_title">Integrating Xcelsius with Excel and Access</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://datapigtechnologies.com/blog/index.php/121/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
