<?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"
	>

<channel>
	<title>Contextures Blog</title>
	<atom:link href="http://blog.contextures.com/index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.contextures.com</link>
	<description>Excel tutorials, Excel tips, computer productivity tips</description>
	<pubDate>Wed, 10 Mar 2010 05:04:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
	<image><title>Contextures Blog</title><url>http://blog.contextures.com/wp-content/themes/atahualpa/images/ColoursRSS.gif</url><link>http://blog.contextures.com</link><width>34</width><height>34</height><description>Excel tips and tutorials.</description></image>		<item>
		<title>Sort It Your Way With Excel Custom Lists</title>
		<link>http://blog.contextures.com/archives/2010/03/10/sort-it-your-way-with-excel-custom-lists/</link>
		<comments>http://blog.contextures.com/archives/2010/03/10/sort-it-your-way-with-excel-custom-lists/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 05:04:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel tips]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/03/10/sort-it-your-way-with-excel-custom-lists/</guid>
		<description><![CDATA[You know how to sort an Excel list alphabetically, and with Excel 2007 you can even sort an Excel list by colour. Did you know that you can also create a custom list in Excel and use that to sort your data, instead of sorting in alphabetical or numerical order?
Instead of sorting the products in [...]]]></description>
			<content:encoded><![CDATA[<p>You know how to <a title="sort an Excel list" href="http://www.contextures.com/xlSort01.html" target="_blank">sort an Excel list</a> alphabetically, and with Excel 2007 you can even <a title="sort an Excel list by colour" href="http://blog.contextures.com/archives/2010/02/24/sort-by-colour-in-excel/" target="_blank">sort an Excel list by colour</a>. Did you know that you can also create a custom list in Excel and use that to sort your data, instead of sorting in alphabetical or numerical order?</p>
<p>Instead of sorting the products in this table alphabetically, we’ll create a custom list of products, and use it when sorting the list.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort01" border="0" alt="CustomSort01" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort011.png" width="386" height="241" />&#160; </p>
<h3>Create a Custom List in Excel</h3>
<p>You can create a custom list in Excel by importing a list from a worksheet, or by typing a new list. In this example, there is a worksheet named Lists, and it contains a product list. We’ll import that list, to create the custom list.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort02" border="0" alt="CustomSort02" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort02.png" width="246" height="232" /> </p>
<h5>To create the custom list:</h5>
<ol>
<li>Select the cells that contain the list items </li>
<li>On the Ribbon, click the Office Button, then click Excel Options. </li>
<li>In the Popular category, click Edit Custom Lists
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort03" border="0" alt="CustomSort03" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort03.png" width="389" height="226" />       </li>
<li>In the Custom Lists dialog box, the list address &#8212; $A$2:$A$5 &#8212; should appear in the Import range box. If not, you can click in the Import range box, and type a range, or select a range on the worksheet.
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/03/customsort04.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort04" border="0" alt="CustomSort04" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort04-thumb.png" width="404" height="310" /></a>       </li>
<li>To add the selected range as a custom list, click the Import button. </li>
<li>The list items will appear in the List entries section of the Custom List dialog box, and at the end of the list of existing Custom Lists.
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort05" border="0" alt="CustomSort05" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort05.png" width="321" height="209" />       </li>
<li>Click OK to close the Custom Lists dialog box, and click OK to close the Excel Options window. </li>
</ol>
<h5>Use the Custom List</h5>
<p>You can use the custom lists when sorting, and you can also use them with the AutoFill feature. Type any item from a custom list in a cell, then use the Fill handle to complete the list.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort07" border="0" alt="CustomSort07" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort07.png" width="188" height="168" />&#160;</p>
<h3>Sort the Excel List in Custom Order</h3>
<p>To sort your list based on your custom list, follow these steps:</p>
<ol>
<li>Select a cell in the table that you want to sort. </li>
<li>On the Ribbon’s Data tab, click Sort </li>
<li>In the Sort dialog box, select a Column from the first drop down, and select Values from the Sort On drop down. </li>
<li>In the Order drop down, click Custom List </li>
<li>In the Custom List dialog box, select your custom list, and click OK
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/03/customsort06.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CustomSort06" border="0" alt="CustomSort06" src="http://blog.contextures.com/wp-content/uploads/2010/03/customsort06-thumb.png" width="404" height="189" /></a>       </li>
<li>Click OK to close the Sort dialog box </li>
</ol>
<p>The list is sorted in the order of the items in your custom list.</p>
<h3>Watch the Excel Sort Video</h3>
<p>To see the steps for adding an Excel Custom List, then sorting by that Custom List, watch this short Excel video tutorial.</p>
<p> <object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/3_o-kzpviL0&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3_o-kzpviL0&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object><br />
<h3>More Sort Options</h3>
<p>After I wrote about sorting by colour, Jim Cone offered me a copy of this Special Sort Excel add-in. I finally had a chance to test it, and although I’m still not a fan of sorting by colour, the add-in has several sort options that would be useful. Instead of spending time on workarounds and formulas in helper columns, you can use the add-in. For example, you can: </p>
<ul>
<li>sort a list by the length of the text in the cells </li>
<li>ignore leading articles (A, An, The) </li>
<li>sort based on the reverse order of the cell contents </li>
<li>sort by numbers at the end of the cell text</li>
</ul>
<p>To buy the Special Sort add-in ($19 US), or request a trial version, contact Jim:&#160; james.cone @&#160; comcast.net</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/03/specialsort01.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SpecialSort01" border="0" alt="SpecialSort01" src="http://blog.contextures.com/wp-content/uploads/2010/03/specialsort01-thumb.png" width="404" height="232" /></a>&#160;</p>
<p>____________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F10%2Fsort-it-your-way-with-excel-custom-lists%2F&amp;t=Sort+It+Your+Way+With+Excel+Custom+Lists&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F10%2Fsort-it-your-way-with-excel-custom-lists%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/03/10/sort-it-your-way-with-excel-custom-lists/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Count Cells With Specific Text in Excel</title>
		<link>http://blog.contextures.com/archives/2010/03/08/count-cells-with-specific-text-in-excel/</link>
		<comments>http://blog.contextures.com/archives/2010/03/08/count-cells-with-specific-text-in-excel/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 05:02:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel Formulas]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/03/08/count-cells-with-specific-text-in-excel/</guid>
		<description><![CDATA[While working on a client’s sales plan last week, I had to count the orders for a couple of specific customers.&#160; Here’s a screenshot of some sample data, with the customer names in column B.
 
Count cells that are an exact match
In Excel, you can use the COUNTIF function to count cells that meet a [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a client’s sales plan last week, I had to count the orders for a couple of specific customers.&#160; Here’s a screenshot of some sample data, with the customer names in column B.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CustomerCount01" border="0" alt="CustomerCount01" src="http://blog.contextures.com/wp-content/uploads/2010/03/customercount01.png" width="339" height="312" /> </p>
<h3>Count cells that are an exact match</h3>
<p>In Excel, you can use the COUNTIF function to count cells that meet a specific criterion. For example, you can use this formula to count the orders that were placed by the customer, BigMart.</p>
<p>&#160; <strong>=COUNTIF($B$2:$B$14,&quot;BigMart&quot;)</strong></p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CustomerCount02" border="0" alt="CustomerCount02" src="http://blog.contextures.com/wp-content/uploads/2010/03/customercount02.png" width="266" height="100" />&#160;</p>
<ul>
<li>The first argument, $B$2:$B$14, is the range that contains the cells to be counted. </li>
<li>The second argument, “BigMart”, is the value that we want to count. </li>
</ul>
<p>There are 3 cells that contain the exact text, “BigMart”, so the COUNTIF formula returns 3.</p>
<h3>Use a cell reference in COUNTIF</h3>
<p>Instead of typing the text in the COUNTIF formula, you can refer to a cell that contains the text you want to count. For example, if cell H1 contains the customer name, BigMart, use this formula to count their orders.</p>
<p>&#160; <strong>=COUNTIF($B$2:$B$14, H1)</strong></p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CustomerCount03" border="0" alt="CustomerCount03" src="http://blog.contextures.com/wp-content/uploads/2010/03/customercount03.png" width="253" height="119" /></p>
<p>The COUNTIF formula returns 3, the same result that you got by typing the text in the formula.</p>
<h3>Count non-exact matches</h3>
<p>In the sales plan data that I worked on, there were a few variations on some customer spellings, and I wanted to count all of them. In the screenshot at the start of this article, you can see that BigMart is also listed as Big-Mart and Big Mart.</p>
<h5>Use the * wildcard</h5>
<p>To count all the variations, you can use the wildcard character, <strong>*</strong>, to represent any characters, or no characters, in the text string. For example, if cell H1 contains the customer name with a wildcard, <strong>Big*Mart</strong>, use this formula to count all the variations.</p>
<p>&#160; <strong>=COUNTIF($B$2:$B$14, H1)</strong></p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CustomerCount04" border="0" alt="CustomerCount04" src="http://blog.contextures.com/wp-content/uploads/2010/03/customercount04.png" width="279" height="129" /></p>
<p>The COUNTIF formula returns 7, because it counts <strong>BigMart</strong>, <strong>Big-Mart</strong> and <strong>Big Mart</strong>.</p>
</p>
<h5>Use the ? wildcard</h5>
<p>If you use the <strong>?</strong> wildcard character instead of the <strong>*</strong> wildcard character, it represents one character. </p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CustomerCount05" border="0" alt="CustomerCount05" src="http://blog.contextures.com/wp-content/uploads/2010/03/customercount05.png" width="289" height="140" /> </p>
<p>Now the COUNTIF formula returns 4, because it counts <strong>Big-Mart</strong> and <strong>Big Mart</strong>, but not <strong>BigMart</strong>. It doesn’t count BigMart, because there isn’t a character between the g and the M.</p>
<h3>More COUNTIF Examples</h3>
<p>For a few more examples of counting cells with specific text, you can visit the <a title="Excel Count Functions" href="http://www.contextures.com/xlFunctions04.html" target="_blank">Excel Count Functions</a> page on the Contextures website.</p>
<p>_______________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F08%2Fcount-cells-with-specific-text-in-excel%2F&amp;t=Count+Cells+With+Specific+Text+in+Excel&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F08%2Fcount-cells-with-specific-text-in-excel%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/03/08/count-cells-with-specific-text-in-excel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Plan Your Party Seating with Excel</title>
		<link>http://blog.contextures.com/archives/2010/03/05/plan-your-party-seating-with-excel/</link>
		<comments>http://blog.contextures.com/archives/2010/03/05/plan-your-party-seating-with-excel/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 05:16:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel Data Validation]]></category>

		<category><![CDATA[Excel Formulas]]></category>

		<category><![CDATA[Excel Templates]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/03/05/plan-your-party-seating-with-excel/</guid>
		<description><![CDATA[If you’re having a party this weekend, you can use Excel to plan the guest seating. And if you sent me an invitation, it hasn’t arrived yet!
In this example, you’ll enter the guest names on an Excel worksheet, then fill the tables by selecting names from data validation drop down lists. After you’ve selected a [...]]]></description>
			<content:encoded><![CDATA[<p>If you’re having a party this weekend, you can use Excel to plan the guest seating. And if you sent me an invitation, it hasn’t arrived yet!</p>
<p>In this example, you’ll enter the guest names on an Excel worksheet, then fill the tables by selecting names from data validation drop down lists. After you’ve selected a name, it will disappear from the drop down lists, so you can’t accidentally assign one of the guests to two different seats.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan01" border="0" alt="SeatPlan01" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan01.png" width="316" height="312" /> </p>
<p>&#160;</p>
<h3>Enter the Guest Names</h3>
<p>On a worksheet named Lists, the guest names are typed in column B. Sort the names in alphabetical order, so the names will be easier to find in the data validation drop down lists.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan02" border="0" alt="SeatPlan02" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan02.png" width="157" height="294" /> </p>
<h3>Draw the Tables and Chairs</h3>
<p>On a sheet named TablePlan, use the Excel drawing tools to create the tables and chairs. I used the Oval shape to draw 3 tables, with 8 chairs at each table. </p>
<p>Tip: To draw a circle, hold the Shift key while you use the Oval shape drawing tool.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan03" border="0" alt="SeatPlan03" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan03.png" width="343" height="370" /> </p>
<p>You can number and colour code the tables, to make it easier to keep track of things.</p>
<h3>List the Tables and Seats</h3>
<p>To the left of the table diagram, create a list of the tables and seat numbers. If you colour coded the tables, use the same colours in the table list.</p>
<p>In the next column, format the cells where you’ll select the guest names. You’ll add data validation to those cells later.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan04" border="0" alt="SeatPlan04" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan04.png" width="209" height="231" /> </p>
<h3>Add a Formula to the Guest List</h3>
<p>On the Lists worksheet, you’ll add a formula to check if the name in that row has been assigned a seat. The first name is in cell B1, so enter this formula in cell C1:</p>
<p><strong>=IF(COUNTIF(TablePlan!$D$2:$D$25,B1),&quot;&quot;,ROW())</strong></p>
<p>Copy the formula down to the last name.</p>
<p>If a guest has been assigned to a seat, their name will appear in column D on the TablePlan sheet. In that case, this formula will return an empty string. If a seat hasn’t been assigned, the formula will return the row number.</p>
<h3>Create the List of Unassigned Guests</h3>
<p>In column D, you’ll add an array formula to list the unassigned names. This list will be used for the data validation drop down lists.</p>
<p>In this example, cells D1:D24 are selected, and this formula is array entered (press Ctrl+Shift+Enter)</p>
<p><strong>=IF(ROW(B1:B24)-ROW(B1)+1&gt;COUNT(C1:C24),&quot;&quot;,     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; INDEX(B:B,SMALL(C1:C24,ROW(INDIRECT(&quot;1:&quot;&amp;ROWS(B1:B24))))))</strong></p>
<p>This is a multi-cell array formula (by DanielM.) that moves blank cells to the bottom of the list. For more information on this formula, see <a title="Excel Data Validation – Hide Previously Used Items" href="http://www.contextures.com/xlDataVal03.html" target="_blank">Excel Data Validation – Hide Previously Used Items</a>.</p>
<p>In the screenshot below, some of the guest have been assigned to seats, and their names don’t appear in column D.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan05" border="0" alt="SeatPlan05" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan05.png" width="250" height="220" /> </p>
<h3>Define a Named Range</h3>
<p>Next, you’ll create a dynamic named range for the unassigned guests lists.</p>
<ol>
<li>On the Excel Ribbon, click the Formulas tab</li>
<li>Click Define Name</li>
<li>In the New Name dialog box, type NameCheck as the name</li>
<li>In the Refers to box, type this OFFSET formula, then click OK</li>
</ol>
<p><strong>=OFFSET(Lists!$D$1,0,0,COUNTA(Lists!$D$1:$D$24)     <br />&#160;&#160;&#160;&#160;&#160; -COUNTBLANK(Lists!$D$1:$D$24),1)</strong></p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan06" border="0" alt="SeatPlan06" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan06.png" width="404" height="254" /> </p>
<h3>Add the Data Validation Drop Down Lists</h3>
<p>Next, you’ll add the drop down lists:</p>
<ol>
<li>On the TablePlan sheet, select the cells for Guest names, cells D2:D25 in this example.</li>
<li>On the Excel Ribbon, click the Data tab</li>
<li>Click Data Validation</li>
<li>In the Data Validation dialog box, from the Allow drop down, select List</li>
<li>In the Source box, type:&#160; =NameCheck</li>
<li>Click OK</li>
</ol>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan07" border="0" alt="SeatPlan07" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan07.png" width="298" height="214" /> </p>
<p>The drop down lists are added to the cells, and you can select a guest name.</p>
<h3>Link the Seats to the Guests</h3>
<p>To show the guest names on the assigned seats, you can link the shapes to the cells.</p>
<ol>
<li>Click on the shape for Seat 1 at Table 1.</li>
<li>Click in the Formula Bar</li>
<li>Type an equal sign, then click on the guest list, where the Table 1 Seat 1 name will be entered</li>
<li>Press Enter to complete the link</li>
</ol>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SeatPlan08" border="0" alt="SeatPlan08" src="http://blog.contextures.com/wp-content/uploads/2010/03/seatplan08.png" width="362" height="222" /></p>
<p>Repeat these steps to link all the seats to the guest link cells.</p>
<h3>Assign the Guest Seats</h3>
<p>Now you can select guest names from the drop down lists on the TablePlan sheet, and get your party organized. Keep all those arguing relatives at separate tables, and everything should go well.</p>
<h3> Download the Sample File</h3>
<p>If you’re planning your own party, you can download the sample file with an <a title="Excel seating arrangement" href="http://www.contextures.com/SeatPlan.zip" target="_blank">Excel seating arrangement</a> example.</p>
<p>__________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F05%2Fplan-your-party-seating-with-excel%2F&amp;t=Plan+Your+Party+Seating+with+Excel&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F05%2Fplan-your-party-seating-with-excel%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/03/05/plan-your-party-seating-with-excel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Running Totals Are Easy With Excel Pivot Tables</title>
		<link>http://blog.contextures.com/archives/2010/03/03/running-totals-are-easy-with-excel-pivot-tables/</link>
		<comments>http://blog.contextures.com/archives/2010/03/03/running-totals-are-easy-with-excel-pivot-tables/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 05:03:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Pivot Table]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/03/03/running-totals-are-easy-with-excel-pivot-tables/</guid>
		<description><![CDATA[This week I’m working on a client’s sales plans for the upcoming fiscal year. They forecast sales per month by product and customer, and we use some pretty complicated formulas to sort things out. Of course, anywhere that it makes sense to use a pivot table, I create one. It’s a great way to summarize [...]]]></description>
			<content:encoded><![CDATA[<p>This week I’m working on a client’s sales plans for the upcoming fiscal year. They forecast sales per month by product and customer, and we use some pretty complicated formulas to sort things out. Of course, anywhere that it makes sense to use a pivot table, I create one. It’s a great way to summarize all the details, and review the overall totals.</p>
<p>For example, on a worksheet you can use formulas to create a running total, but in a pivot table it’s much easier&#160; &#8212; you can quickly create running totals with a couple of mouse clicks. </p>
<p>Let’s take a look at a pivot table based on some faked sales data. In the screen shot below, you can see the total sales per region per month, and the Grand Total per month. By changing the Sales field settings, you can show a running total, instead of the normal Sum.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PivotRunningTotal01" border="0" alt="PivotRunningTotal01" src="http://blog.contextures.com/wp-content/uploads/2010/03/pivotrunningtotal01.png" width="316" height="274" /> </p>
<h3>Add the Running Total</h3>
<p>To change the sales field, and show a running total, follow these steps:</p>
<ol>
<li>In the pivot table, right-click one of the Sales amount cells. </li>
<li>In the context menu that appears, click Summarize Data By </li>
<li>Click More Options
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PivotRunningTotal02" border="0" alt="PivotRunningTotal02" src="http://blog.contextures.com/wp-content/uploads/2010/03/pivotrunningtotal02.png" width="381" height="206" />       </li>
<li>In the Value Field Settings dialog box, click the Show Values As tab </li>
<li>From the Show Values As dropdown list, select Running Total In. </li>
<li>Select the Base Field where you want to see the running total. In this example, we’d like to see the running total down the list of dates, so OrderDate is selected as the Base Field.
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PivotRunningTotal04" border="0" alt="PivotRunningTotal04" src="http://blog.contextures.com/wp-content/uploads/2010/03/pivotrunningtotal04.png" width="359" height="318" />       </li>
<li>Click OK, to close the Value Field Settings dialog box. </li>
</ol>
<p>The pivot table changes, to show the running total for sales.</p>
<p>In the following screenshot, you can see the running totals in column C, and the original monthly totals in column H. Each month’s total sales is added to the previous total, to show the running total.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PivotRunningTotal05" border="0" alt="PivotRunningTotal05" src="http://blog.contextures.com/wp-content/uploads/2010/03/pivotrunningtotal05.png" width="281" height="246" /></p>
<h3>Change the Running Total Base Field </h3>
<p>The most common use for running totals is to show amounts accumulated over time, as in the sales by month example above. However, you can use a non-date field as the base field for a running total. For example, in an election, you could show a running total of votes as each district submits its results. Or, for a large construction project, you could show a running total of expenses over the project phases.</p>
<p>In this pivot table, I’ve added City to the Column area, and used that as the Base Field for the running total.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PivotRunningTotal06" border="0" alt="PivotRunningTotal06" src="http://blog.contextures.com/wp-content/uploads/2010/03/pivotrunningtotal06.png" width="383" height="181" />&#160;&#160; </p>
<p>Now, instead of the running total going down the pivot table by month, it goes across the pivot table, by city.</p>
<p>Be careful though &#8212; if you use a Base Field that isn’t in the pivot table layout, you’ll see #N/A for all the running total values.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PivotRunningTotal07" border="0" alt="PivotRunningTotal07" src="http://blog.contextures.com/wp-content/uploads/2010/03/pivotrunningtotal07.png" width="385" height="183" /></p>
<h3>Running Totals in Excel 2003 Pivot Tables</h3>
<p>The running total technique is similar in Excel 2003 pivot table, and you can see the instructions here: <a title="Excel 2003 Pivot Table Running Totals" href="http://www.contextures.com/xlPivot14.html" target="_blank">Excel 2003 Pivot Table Running Totals</a>. It also shows the results when there are multiple fields in the row area, and a running total is added to one of those fields.</p>
<h3>Watch the Running Totals Video</h3>
<p>To see the steps for creating running totals in Excel 2003, please watch this short Pivot Table Running Totals video.</p>
<p> <object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/2MjeqlTWUdk&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2MjeqlTWUdk&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object>
<p>__________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F03%2Frunning-totals-are-easy-with-excel-pivot-tables%2F&amp;t=Running+Totals+Are+Easy+With+Excel+Pivot+Tables&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F03%2Frunning-totals-are-easy-with-excel-pivot-tables%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/03/03/running-totals-are-easy-with-excel-pivot-tables/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Back In Time With Microsoft Excel</title>
		<link>http://blog.contextures.com/archives/2010/03/01/back-in-time-with-microsoft-excel/</link>
		<comments>http://blog.contextures.com/archives/2010/03/01/back-in-time-with-microsoft-excel/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 05:16:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Microsoft Excel Versions]]></category>

		<category><![CDATA[Microsoft Office]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/03/01/back-in-time-with-microsoft-excel/</guid>
		<description><![CDATA[A very nice email, from someone who visited the Contextures website, made me think about how long I’ve been using Excel. My guess was that I’d started around 1987, so I fired up the old Mac laptop, and dug some old floppies out of the storage cupboard.

The laptop is a Mac PowerBook 170, from late [...]]]></description>
			<content:encoded><![CDATA[<p>A very nice email, from someone who visited the Contextures website, made me think about how long I’ve been using Excel. My guess was that I’d started around 1987, so I fired up the old Mac laptop, and dug some old floppies out of the storage cupboard.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac01.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac01" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac01-thumb.jpg" border="0" alt="ExcelMac01" width="369" height="340" /></a></p>
<p>The laptop is a Mac PowerBook 170, from late 1991, and it’s running the Mac version of Excel 3.0. There’s a Mac 128K model in the back room too, but I didn’t have the strength to dig that out. (I hope the producers of the tv series, The Hoarders, don’t call me now.)</p>
<p>As you can see, the application files were much smaller in Excel 3.0. Of course, that still took a good chunk out of my 40MB hard drive.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac02.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac02" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac02-thumb.jpg" border="0" alt="ExcelMac02" width="404" height="135" /></a></p>
<h3>Flashy Excel Charts</h3>
<p>Even though the machine didn’t have colour, I was still able to make some pretty flashy 3-D charts in the old days. I have no idea what this was supposed to show, but maybe it was the results of an Olympic ski jumping event.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac03.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac03" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac03-thumb.jpg" border="0" alt="ExcelMac03" width="404" height="275" /></a></p>
<p>I’m sure that I never wasted any time playing TETRIS, when I was supposed to be working on Excel files.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac04.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac04" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac04-thumb.jpg" border="0" alt="ExcelMac04" width="426" height="340" /></a></p>
<h3>Sorting a List</h3>
<p>Way back then (and until Excel 2007), we were only able to sort by 3 levels, and we couldn’t sort by colour. That didn’t matter much to me, since I didn’t have colour!</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac05.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac05" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac05-thumb.jpg" border="0" alt="ExcelMac05" width="442" height="340" /></a></p>
<h3>My Oldest Excel File</h3>
<p>There may be something older on a floppy disk at the back of the storage cupboard, but I finally found an Excel file that I’d worked on in April 1987. I was creating some Excel training files, to be used by Apple vendors.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac06.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac06" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac06-thumb.jpg" border="0" alt="ExcelMac06" width="452" height="169" /></a></p>
<h3>The Excel 3.0 File and Excel Toolbar</h3>
<p>Here’s what the file looked like, and it’s interesting to see the minimalist toolbar too. Do you remember what all those icons were for?</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac07.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ExcelMac07" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelmac07-thumb.jpg" border="0" alt="ExcelMac07" width="404" height="262" /></a></p>
<h3>How Long Have You Used Excel?</h3>
<p>There’s an Excel poll on my Debra D blog, so if you have a minute, please go and answer the question – <a title="How Long Have You Been Using Excel" href="http://debradalgleish.com/blog/2010/02/28/how-long-have-you-been-using-excel/" target="_blank">How Long Have You Been Using Excel</a>?</p>
<h3>It’s About Time</h3>
<p>When I was thinking of a title for this blog post, a really old (and really bad) tv series popped into my head – It’s About Time. The show was about two astronauts who accidentally break the time barrier, and go back to prehistoric days, where they live with a cave family. In a strange coincidence, Wikipedia says that one of the astronauts in <a title="It’s About Time" href="http://en.wikipedia.org/wiki/It%27s_About_Time_%28TV_series%29" target="_blank">It’s About Time</a> was named <strong>Mac</strong>. By the way, they changed Imogene Coca’s character name to Shadd, after the pilot episode.</p>
<p>The series was by the creator of Gilligan&#8217;s Island, and used sets, props and music from that series. Here’s a clip from YouTube that shows the opening and closing credits and theme song. Please don’t blame me if the song gets stuck in your head.</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:5fe23bb4-df2d-48bb-8150-41557e3716ba" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<div id="98312d96-3f4a-477b-b359-c6ce5ae7c713" style="margin: 0px; padding: 0px; display: inline;">
<div><a href="http://www.youtube.com/watch?v=J1G-TsdNWGg&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" target="_new"><img style="border-style: none" src="http://blog.contextures.com/wp-content/uploads/2010/02/video9f6d04607ebb.jpg" alt="" width="\" height="\" /></a></div>
</div>
</div>
<p>____________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F01%2Fback-in-time-with-microsoft-excel%2F&amp;t=Back+In+Time+With+Microsoft+Excel&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F03%2F01%2Fback-in-time-with-microsoft-excel%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/03/01/back-in-time-with-microsoft-excel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Collect Data From Users in Excel VBA</title>
		<link>http://blog.contextures.com/archives/2010/02/26/collect-data-from-users-in-excel-vba/</link>
		<comments>http://blog.contextures.com/archives/2010/02/26/collect-data-from-users-in-excel-vba/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 05:01:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel VBA]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/02/26/collect-data-from-users-in-excel-vba/</guid>
		<description><![CDATA[You can use Excel VBA to show messages to someone who’s using your workbook. This messages lets the user know that a customer name must be selected, and there’s an OK button to click after reading the message. (No one would ever click the OK button without reading the message, would they?)
 
But sometimes you [...]]]></description>
			<content:encoded><![CDATA[<p>You can use <a title="Excel VBA to show messages" href="http://blog.contextures.com/archives/2009/12/11/excel-vba-show-a-message-to-users/">Excel VBA to show messages</a> to someone who’s using your workbook. This messages lets the user know that a customer name must be selected, and there’s an OK button to click after reading the message. (No one would ever click the OK button without reading the message, would they?)</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CustMsg06" border="0" alt="CustMsg06" src="http://blog.contextures.com/wp-content/uploads/2010/02/custmsg06.jpg" width="201" height="129" /> </p>
<p>But sometimes you want to get information from a user, instead of giving it. Let’s look at a couple of ways to do that, in Excel VBA.</p>
<h3>Add Buttons to an Excel Message Box</h3>
<p>The message box that’s shown above appears if someone tries to print an order form, and a customer name hasn’t been selected. Here’s the code that we created in the previous blog post on using <a title="Excel VBA to show messages" href="http://blog.contextures.com/archives/2009/12/23/excel-vba-show-a-message-before-printing/">Excel VBA to show messages</a>.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="VBEBeforePrint05" border="0" alt="VBEBeforePrint05" src="http://blog.contextures.com/wp-content/uploads/2010/02/vbebeforeprint05.png" width="391" height="135" /> </p>
<p>A message box can return information to Excel VBA, as well as give information to the user. Instead of a single OK button on the message box, you could show Yes and No buttons. Perhaps the user needs to print an order form occasionally, without a customer name.</p>
<p>We’ll change the message text, to ask, “Print without Customer Name?” and we’ll change the message box style from vbCritical to vbYesNo.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ExcelVBAInput01" border="0" alt="ExcelVBAInput01" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelvbainput01.gif" width="395" height="197" /></p>
<p>Now, if you try to print with no customer name, the message box shows the Yes and No buttons, with the new text.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ExcelVBAInput02" border="0" alt="ExcelVBAInput02" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelvbainput02.gif" width="193" height="107" /> </p>
<h3>Change the Button Behaviour</h3>
<p>With the new message box code, we have two buttons, but it doesn’t matter which one you click – the printing is still cancelled. We’d like to change the code so that if you click No, the printing is cancelled, and if you click Yes, the order form is printed.</p>
<p>When someone clicks a button in a message box, it returns a numeric value. There’s a list in the Excel VBA Help that shows the value returned by each button.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ExcelVBAInput03" border="0" alt="ExcelVBAInput03" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelvbainput03.gif" width="251" height="175" /> </p>
<p>So, if someone clicks the Yes button, it returns a numeric value of 6. We’ll change the code to capture this.</p>
<ol>
<li>We’ll add a variable, lRsp, to the code, to store the returned value. </li>
<li>At the start of the MsgBox line, add the lRsp variable, and enclose the MsgBox arguments in brackets. </li>
<li>Add an If…End If statement, to cancel the printing if the returned value is not equal to 6. </li>
</ol>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="ExcelVBAInput04" border="0" alt="ExcelVBAInput04" src="http://blog.contextures.com/wp-content/uploads/2010/02/excelvbainput04.gif" width="410" height="188" /> </p>
<h3>Download the Sample File</h3>
<p>To see the order form and the completed Excel VBA code, you can <a title="download the Excel order form" href="http://www.contextures.com/OrderFormMsgEvent04.zip">download the Excel order form</a>. Enable macros when the file opens.</p>
<h3>Use an Excel UserForm</h3>
<p>If you need to collect more than a Yes or No response from your users, you can use an Excel UserForm. There are written instructions and video tutorials here: <a title="Excel UserForm With ComboBoxes" href="http://www.contextures.com/xlUserForm02.html">Excel UserForm With ComboBoxes</a>&#160; </p>
<p>_______________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F26%2Fcollect-data-from-users-in-excel-vba%2F&amp;t=Collect+Data+From+Users+in+Excel+VBA&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F26%2Fcollect-data-from-users-in-excel-vba%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/02/26/collect-data-from-users-in-excel-vba/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sort By Colour in Excel</title>
		<link>http://blog.contextures.com/archives/2010/02/24/sort-by-colour-in-excel/</link>
		<comments>http://blog.contextures.com/archives/2010/02/24/sort-by-colour-in-excel/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 05:02:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel tips]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/02/24/sort-by-colour-in-excel/</guid>
		<description><![CDATA[In the old days, the Sort dialog box in Excel only had 3 levels. However, with a bit of planning, you could sort Excel data by 4 columns or more, and once you learned that trick, life was good. Or at least it was sort of good.  

In Excel 2007, the Sort dialog box [...]]]></description>
			<content:encoded><![CDATA[<p>In the old days, the Sort dialog box in Excel only had 3 levels. However, with a bit of planning, you could <a title="sort Excel data by 4 columns" href="http://www.contextures.com/xlSort01.html#Sort04">sort Excel data by 4 columns</a> or more, and once you learned that trick, life was good. Or at least it was sort of good. <img src='http://blog.contextures.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Sort03" border="0" alt="Sort03" src="http://blog.contextures.com/wp-content/uploads/2010/02/sort03.gif" width="274" height="283" /></p>
<p>In <a title="Excel 2007, the Sort dialog" href="http://blog.contextures.com/archives/2009/11/13/out-of-sorts-in-excel/">Excel 2007, the Sort dialog</a> box is much fancier, and you can include up to 64 sorting levels. I’ve never needed anywhere near that many – 5 or 6 fields is plenty for most tables that I’ve had to sort.</p>
<h3>Sort By Colour</h3>
<p>Another new feature in Excel 2007 is the ability to sort by cell or font colour, or by cell icon.</p>
</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortColour01" border="0" alt="SortColour01" src="http://blog.contextures.com/wp-content/uploads/2010/02/sortcolour01.png" width="389" height="219" /> </p>
<p>If you have different colours in a column, you can choose one to show up at the top or bottom of a sorted list.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortColour02" border="0" alt="SortColour02" src="http://blog.contextures.com/wp-content/uploads/2010/02/sortcolour02.png" width="258" height="156" /> </p>
<p>If you used conditional formatting to add cell icons, such as traffic lights, you can sort by those icons.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortColour06" border="0" alt="SortColour06" src="http://blog.contextures.com/wp-content/uploads/2010/02/sortcolour06.png" width="262" height="172" /></p>
<p>To put the colours or cell icons in a specific order, you can add the same field multiple times in the Sort dialog box, and choose a different colour or cell icon for each sorting level. This won’t be too difficult if you have only a few colours in the list, but will be more challenging if you have lots of colours.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortColour03" border="0" alt="SortColour03" src="http://blog.contextures.com/wp-content/uploads/2010/02/sortcolour03.png" width="263" height="181" /> </p>
<p>The list on my worksheet, that was previously sorted by date, is now sorted by the colours, in the order that I selected above. Yellow isn’t in the Sort level specifications, so it appears at the bottom of the list.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortColour04" border="0" alt="SortColour04" src="http://blog.contextures.com/wp-content/uploads/2010/02/sortcolour04.png" width="312" height="216" /> </p>
<h3>Sort By Colour At Your Own Risk</h3>
<p>Even though you can sort by colour now, I wouldn’t recommend it. I’ve seen too many rainbow coloured Excel worksheets, where nobody can remember what the colours mean. Is yellow good? Is blue bad? Is there a colour code somewhere? </p>
<p>I’d rather add another column in the worksheet, and put a number code or text comment there. So, instead of marking the overdue accounts with a red fill colour, type “Overdue” in another column, or use a formula to calculate which accounts are overdue.</p>
<p>Or, instead of highlighting the customer names that you want to send an email to, type an X in an Email column. Then, you can sort or filter the Overdue accounts or the Email column, to focus on the rows of interest.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="SortColour05" border="0" alt="SortColour05" src="http://blog.contextures.com/wp-content/uploads/2010/02/sortcolour05.png" width="255" height="173" /> </p>
<h3>Do You Sort By Colour?</h3>
<p>Maybe I’m missing something, and the feature is working well for you. Some people must have asked for the feature, since they added it to Excel 2007. </p>
<p>In your Excel worksheets, do you ever sort by colour? In what kind of lists or situations is it most helpful for you? </p>
<p>_______________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F24%2Fsort-by-colour-in-excel%2F&amp;t=Sort+By+Colour+in+Excel&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F24%2Fsort-by-colour-in-excel%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/02/24/sort-by-colour-in-excel/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More Room to Work in Excel 2007</title>
		<link>http://blog.contextures.com/archives/2010/02/22/more-room-to-work-in-excel-2007/</link>
		<comments>http://blog.contextures.com/archives/2010/02/22/more-room-to-work-in-excel-2007/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 05:02:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel Formulas]]></category>

		<category><![CDATA[Excel tips]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/02/22/more-room-to-work-in-excel-2007/</guid>
		<description><![CDATA[You might not love the Ribbon in Excel 2007, but the user interface does have new features that are an improvement over Excel 2003. The new features are useful when you’re working with large formulas or long names.
Change the Formula Bar Height
In Excel 2003, if you click on a cell that contains a long formula, [...]]]></description>
			<content:encoded><![CDATA[<p>You might not love the Ribbon in Excel 2007, but the user interface does have new features that are an improvement over Excel 2003. The new features are useful when you’re working with large formulas or long names.</p>
<h3>Change the Formula Bar Height</h3>
<p>In Excel 2003, if you click on a cell that contains a long formula, it can spill onto the worksheet, hiding the column headings. It’s nice to see the formula, if you want to edit it, but annoying if you’re trying to do something else.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="LongFormula01" border="0" alt="LongFormula01" src="http://blog.contextures.com/wp-content/uploads/2010/02/longformula01.png" width="360" height="166" /> </p>
<p>In Excel 2007, you can adjust the height of the formula bar, and the long formulas don’t cover the worksheet. To adjust the height:</p>
<ol>
<li>Point to the bar at the bottom of the formula bar.</li>
<li>When the pointer changes to a two headed arrow, drag up or down, to change the formula bar height</li>
</ol>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="FormulaBarHeight01" border="0" alt="FormulaBarHeight01" src="http://blog.contextures.com/wp-content/uploads/2010/02/formulabarheight01.png" width="333" height="122" /> </p>
<p>After you’ve adjusted the height, you can quickly restore it to its previous height, by clicking the Collapse Formula Bar button.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="FormulaBarHeight03" border="0" alt="FormulaBarHeight03" src="http://blog.contextures.com/wp-content/uploads/2010/02/formulabarheight03.png" width="304" height="142" /> </p>
<p>When the formula is collapsed, the button changes to Expand Formula Bar. Click that to return to the previous height setting.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/formulabarheight04.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="FormulaBarHeight04" border="0" alt="FormulaBarHeight04" src="http://blog.contextures.com/wp-content/uploads/2010/02/formulabarheight04-thumb.png" width="242" height="140" /></a> </p>
<p>Also, if the formula is too long to show in the formula bar at its current height, scroll buttons appear, as you can see in the screen shot above. You can click the scroll buttons to view the formula, if you don’t want to change the formula bar height.</p>
<h3>Widen the Name Box</h3>
<p>Another new feature that I find really helpful is the ability to widen the Name Box. Instead of just seeing the start of a long name, and three dots, you can widen the Name Box to see the entire name.</p>
<p>To adjust the Name Box width, point to the dividing line at the right edge of the Name Box, and drag to the right.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="FormulaBarHeight05" border="0" alt="FormulaBarHeight05" src="http://blog.contextures.com/wp-content/uploads/2010/02/formulabarheight05.png" width="259" height="131" /> </p>
<p>To return to the default Name Box width, double-click the dividing line. (At least I think it’s the default width – I’ve changed my settings too many times to remember exactly.)</p>
<p>Excel’s Help says, “The maximum width of the name box is half of the width of the worksheet.” However, I’m able to widen the Name Box to the full width of the worksheet, and narrow it to nothing. Maybe that restriction applied in the Beta version, and the Help wasn’t changed.</p>
<h3>Do You Use These Features?</h3>
<p>I’ve used Excel for so many years without these features, that I often forget they’re available. Long formulas can be hidden in the formula bar when condensed, because they don’t spill onto the worksheet, the way they used to. If a formula is cut off in a logical place, you might not even realize that part of it is hidden. Those scroll buttons are very subtle, and are the only clue that a formula doesn’t fit.</p>
<p>Do you remember to use the new sizing features? Do you prefer them to the Excel static settings?</p>
<h3>Watch the Video</h3>
<p>Here’s a short video that shows the new features for adjusting the formula bar height and the Name Box width. It also shows how to temporarily collapse the Ribbon, so only the tabs are visible. That gives you an extra inch of space, if you need it when working on a large worksheet.</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:a95bf1c8-de69-4914-af72-95bd9cd17cfd" class="wlWriterEditableSmartContent">
<div id="a4331ccd-236b-4993-a3e4-7d95ace278a1" style="margin: 0px; padding: 0px; display: inline;">
<div><a href="http://www.youtube.com/watch?v=fynJcZyfr2o&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" target="_new"><img src="http://blog.contextures.com/wp-content/uploads/2010/02/video8a44f98cd8ab.jpg" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('a4331ccd-236b-4993-a3e4-7d95ace278a1'); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;http://www.youtube.com/v/fynJcZyfr2o&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1&amp;hl=en\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;http://www.youtube.com/v/fynJcZyfr2o&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1&amp;hl=en\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt=""></a></div>
</div>
</div>
</p>
</p>
</p>
<p>_______________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F22%2Fmore-room-to-work-in-excel-2007%2F&amp;t=More+Room+to+Work+in+Excel+2007&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F22%2Fmore-room-to-work-in-excel-2007%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/02/22/more-room-to-work-in-excel-2007/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Excel Pivot Tables At the Olympics</title>
		<link>http://blog.contextures.com/archives/2010/02/19/excel-pivot-tables-at-the-olympics/</link>
		<comments>http://blog.contextures.com/archives/2010/02/19/excel-pivot-tables-at-the-olympics/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 05:02:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel charts]]></category>

		<category><![CDATA[Pivot Table]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/02/19/excel-pivot-tables-at-the-olympics/</guid>
		<description><![CDATA[Are you too old to compete in the Olympics? Maybe you’re not as bendy as those 16-year-old figure skaters, but there might be other sports with athletes about your age.
Athlete bios are posted on the Vancouver 2010 Winter Games website, and I compiled that data, then created a few Excel pivot tables, to analyze the [...]]]></description>
			<content:encoded><![CDATA[<p>Are you too old to compete in the Olympics? Maybe you’re not as bendy as those 16-year-old figure skaters, but there might be other sports with athletes about your age.</p>
<p>Athlete bios are posted on the <a title="Vancouver 2010 Winter Games" href="http://www.vancouver2010.com/olympic-athletes/" target="_blank">Vancouver 2010 Winter Games</a> website, and I compiled that data, then created a few Excel pivot tables, to analyze the athletes’ ages.</p>
<ul>
<li>Which Winter Olympic sports have the oldest athletes?</li>
<li>Which countries send the youngest participants?</li>
<li>Do similar age groups compete in different sports?</li>
<li>Who wears the wildest pants?</li>
</ul>
<p>With our Excel pivot tables, and some pivot table grouping, we can find the answers to those pressing questions. Well, maybe not the pants issue, but let’s look at the age questions.</p>
<h3>Show Maximum Values in a Pivot Table</h3>
<p>Using the Olympic athlete biographical data, I created an Excel pivot table with Sport in the Row Labels area, and Age in the Values area. The default is to show the Sum of Age, which isn’t too helpful.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age01" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age01.png" border="0" alt="Olympic2010Age01" width="321" height="217" /></p>
<p>Instead of a sum, I’d like to see the maximum age for athletes in each sport.</p>
<ul>
<li>To change the summary function in an Excel pivot table Values field, right-click on one of the values in that field.</li>
<li>Click Summarize Data By, then click a different summary function. I’ll click Max, to see the highest age in each sport.</li>
</ul>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age02" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age02.png" border="0" alt="Olympic2010Age02" width="336" height="321" /></p>
<p>Then, I can sort the list in descending order by Age, to highlight the sports with the oldest competitors.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age03" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age03.png" border="0" alt="Olympic2010Age03" width="293" height="370" /></p>
<p>Alpine skiing is a surprising winner, and as I expected, figure skating and short track have a much lower maximum age.</p>
<h3>Show a Count of Athletes</h3>
<p>Maybe there’s only one Alpine skiier, and s/he’s really old. To compare the number of athletes in each sport, I’ll add the athlete’s name field to the Values area, and it will appear as Count of Name.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age04" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age04.png" border="0" alt="Olympic2010Age04" width="389" height="392" /></p>
<p>Except for the last two items, there’s a good number of athletes in each sport, with Alpine Skiing as the second largest group.</p>
<h3>See Athlete Age by Country</h3>
<p>If we replace Sport with Nationality in the Row Labels area, we can see the maximum age and athlete count for each country.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age05.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age05" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age05-thumb.png" border="0" alt="Olympic2010Age05" width="332" height="230" /></a></p>
<p>That 51-year-old alpine skier is from Mexico, and is the only athlete from that country. Coincidentally, Great Britain sent 51 athletes, but the oldest is 45.</p>
<p>To see the average age per country, you can change the summary function to Average, then sort the ages in ascending order. The lowest average ages are from countries with a small number of athletes.</p>
<p><a href="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age06.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age06" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age06-thumb.png" border="0" alt="Olympic2010Age06" width="361" height="253" /></a></p>
<p>To see the average ages for the larger contingents, we can filter the countries by the Count of Name value. Click the drop down arrow for the Nationality field, click Value Filters, then click Top 10. I selected to see the Top 10 items by Count of Name.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age07" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age07.png" border="0" alt="Olympic2010Age07" width="397" height="166" /></p>
<p>The pivot table now shows only the countries with the largest number of participants, sort by average age. There’s not much difference in the average ages among countries in the top 10 list.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age08" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age08.png" border="0" alt="Olympic2010Age08" width="343" height="251" /></p>
<p>That’s not too encouraging! If I want to compete in the next Winter Olympics, I should move to Mexico, and take up alpine skiing.</p>
<h3>Age Range in Selected Sports</h3>
<p>Finally, let’s see the age range in a few of the ice sports.  I removed Nationality from the Row Labels, and added Sports. Then, I filtered the list, to show only four of the sports – curling, figure skating, ice hockey and speed skating.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age09" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age09.png" border="0" alt="Olympic2010Age09" width="394" height="242" /></p>
<p>Figure skating has the narrowest age range, and curling has the widest. Maybe I can stay in Canada, and learn how to curl.</p>
<p>Instead of showing the individual ages on the chart, I can group the ages into 5 year bands. Right-click on an Age, and click Group. Then enter 5 in the By box, and click OK.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age10" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age10.png" border="0" alt="Olympic2010Age10" width="309" height="206" /></p>
<p>The chart looks less like the Rocky Mountains, and it’s easier to see the age ranges for each sport.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Olympic2010Age11" src="http://blog.contextures.com/wp-content/uploads/2010/02/olympic2010age11.png" border="0" alt="Olympic2010Age11" width="392" height="240" /></p>
<h3>Download the Data</h3>
<p>I’ve saved the athlete bio data in a zipped text file that you can download, and use it to create your own pivot table. Let me know if you make any surprising discoveries.</p>
<p><a title="Download the athlete data" href="http://www.contextures.com/AthletesData.zip" target="_blank">Download the athlete data</a></p>
<p><a title="Excel Pivot Table Tutorials" href="http://www.contextures.com/tiptech.html#PivotTables">Excel Pivot Table Tutorials</a></p>
<p>___________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F19%2Fexcel-pivot-tables-at-the-olympics%2F&amp;t=Excel+Pivot+Tables+At+the+Olympics&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F19%2Fexcel-pivot-tables-at-the-olympics%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/02/19/excel-pivot-tables-at-the-olympics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Clean Excel Data With TRIM and SUBSTITUTE</title>
		<link>http://blog.contextures.com/archives/2010/02/17/clean-excel-data-with-trim-and-substitute/</link>
		<comments>http://blog.contextures.com/archives/2010/02/17/clean-excel-data-with-trim-and-substitute/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 05:01:00 +0000</pubDate>
		<dc:creator>Debra Dalgleish</dc:creator>
		
		<category><![CDATA[Excel Formulas]]></category>

		<guid isPermaLink="false">http://blog.contextures.com/archives/2010/02/17/clean-excel-data-with-trim-and-substitute/</guid>
		<description><![CDATA[You have two Excel lists, and you’re trying to find the items that are in both lists. You know there are matching items, but your VLOOKUP formulas can’t find them. In this screenshot, the tiptech.html page is in both lists, but the VLOOKUP formula in cell C2 can’t find it.
 
Spot the Differences
Working with Excel [...]]]></description>
			<content:encoded><![CDATA[<p>You have two Excel lists, and you’re trying to find the items that are in both lists. You know there are matching items, but your VLOOKUP formulas can’t find them. In this screenshot, the tiptech.html page is in both lists, but the VLOOKUP formula in cell C2 can’t find it.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TRIM01" border="0" alt="TRIM01" src="http://blog.contextures.com/wp-content/uploads/2010/02/trim01.png" width="391" height="233" /> </p>
<h3>Spot the Differences</h3>
<p>Working with Excel data can be like one of those “<a title="Spot the Difference" href="http://en.wikipedia.org/wiki/Spot_the_difference" target="_blank">Spot the Difference</a>” puzzles. What’s different between list A and list B? If you’re lucky, the differences are obvious, like the forward slash in column B, and no leading slash in column E. Other times, it’s tougher to find the differences.</p>
<p>A common problem is items with leading or trailing spaces. You can’t see them on the screen, but after you’ve encountered them a few times, you learn to check for them. The LEN function is a great help if you suspect there are hidden space characters.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TRIM02" border="0" alt="TRIM02" src="http://blog.contextures.com/wp-content/uploads/2010/02/trim02.png" width="339" height="276" /> </p>
<p>If you use the LEN function to compare the length of the text in cell B2 and E4, you’d see that there are 2 additional characters in cell B2. One character is the forward slash, and the other character is a trailing space.</p>
<h3>Remove Leading and Trailing Spaces</h3>
<p>If you want to use a VLOOKUP or MATCH to find column B items, in column E, you’ll have to get rid of any extra characters. First, you can deal with the spaces, by using the TRIM function.</p>
<p>To return the text from cell B2, without any leading or trailing characters, you’d use this formula:</p>
<p><strong>=TRIM(B2)</strong></p>
<p>If you use a formula in cell B12 to check the length of the trimmed text, it’s now 13 characters, instead of 14. The trailing space has been removed.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TRIM03" border="0" alt="TRIM03" src="http://blog.contextures.com/wp-content/uploads/2010/02/trim03.png" width="328" height="298" /> </p>
<h3>Remove a Specific Character</h3>
<p>Next, you can use the SUBSTITUTE function to remove the forward slash from the text in cell B2.</p>
<p><strong>=SUBSTITUTE(B2,”/”,””)</strong></p>
<ul>
<li>The first argument, <strong>B2</strong>, is the cell that contains the text value.</li>
<li>The second argument, <strong>“/”</strong>, is the old text, that you want to replace.</li>
<li>The third argument, <strong>“”</strong>, is the new text, that replaces the old text. If you want to remove the old text, without inserting new text, use <strong>“”</strong> as an empty string, as we did here.</li>
</ul>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TRIM04" border="0" alt="TRIM04" src="http://blog.contextures.com/wp-content/uploads/2010/02/trim04.png" width="347" height="90" /> </p>
<h3>Combine the Functions</h3>
<p>The TRIM and SUBSTITUTE functions work well separately, and you can combine them, to remove both the spaces and the forward slash. The order doesn’t matter, so you can use either:</p>
<p><strong>=TRIM(SUBSTITUTE(B2,&quot;/&quot;,&quot;&quot;))</strong></p>
<p>or:</p>
<p><strong>=SUBSTITUTE(TRIM(B2),&quot;/&quot;,&quot;&quot;)</strong></p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TRIM05" border="0" alt="TRIM05" src="http://blog.contextures.com/wp-content/uploads/2010/02/trim05.png" width="383" height="309" /> </p>
<h3>Add to the VLOOKUP</h3>
<p>Now that you know the TRIM and SUBSTITUTE functions will clean up the text in column B, you can add those functions to the VLOOKUP formula. </p>
<p>Instead of using B2 in the VLOOKUP:</p>
<p><strong>=VLOOKUP(<font color="#0000ff">B2</font>,$E$2:$F$8,2,FALSE)</strong></p>
<p>use the TRIM and SUBSTITUTE functions:</p>
<p><strong>=VLOOKUP(<font color="#0000ff">TRIM(SUBSTITUTE(B2,&quot;/&quot;,&quot;&quot;))</font>,$E$2:$F$8,2,FALSE)</strong></p>
<p>A match for the cleaned up text is found in column E, and the Update column is filled in with the correct date.</p>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="TRIM06" border="0" alt="TRIM06" src="http://blog.contextures.com/wp-content/uploads/2010/02/trim06.png" width="384" height="230" /> </p>
<h3>Troubleshooting a VLOOKUP Formula</h3>
<p>If TRIM and SUBSTITUTE don’t solve your VLOOKUP problems, there are a few more suggestions on the Contextures website: <a title="Troubleshoot the VLOOKUP formula" href="http://www.contextures.com/xlFunctions02.html" target="_blank">Troubleshoot the VLOOKUP formula</a>. You’ll also find examples of using the IF function or IFERROR function to deal with VLOOKUP function errors.</p>
<p>And if that doesn’t work, you could try some Mr. Clean; according to this commercial from the 1950s, it works on everything, including the dog! </p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:a88ca80f-a0c5-4f48-a40d-323349cf68a6" class="wlWriterEditableSmartContent">
<div id="39684386-3cd7-4e72-a693-78d4abdbdbbb" style="margin: 0px; padding: 0px; display: inline;">
<div><a href="http://www.youtube.com/watch?v=wbiofcuTZBo" target="_new"><img src="http://blog.contextures.com/wp-content/uploads/2010/02/video7bcb8e4d44aa.jpg" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('39684386-3cd7-4e72-a693-78d4abdbdbbb'); downlevelDiv.innerHTML = &quot;&lt;div&gt;&lt;object width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;param name=\&quot;movie\&quot; value=\&quot;http://www.youtube.com/v/wbiofcuTZBo&amp;hl=en\&quot;&gt;&lt;\/param&gt;&lt;embed src=\&quot;http://www.youtube.com/v/wbiofcuTZBo&amp;hl=en\&quot; type=\&quot;application/x-shockwave-flash\&quot; width=\&quot;425\&quot; height=\&quot;355\&quot;&gt;&lt;\/embed&gt;&lt;\/object&gt;&lt;\/div&gt;&quot;;" alt=""></a></div>
</div>
</div>
<p>_____________</p>
<div><table> <td><iframe src='http://digg.com/api/diggthis.php?w=new&amp;u=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F17%2Fclean-excel-data-with-trim-and-substitute%2F&amp;t=Clean+Excel+Data+With+TRIM+and+SUBSTITUTE&amp;s=compact' height='18' width='120' frameborder='0' scrolling='no'></iframe></td> <td><iframe src='http://api.tweetmeme.com/button.js?url=http%3A%2F%2Fblog.contextures.com%2Farchives%2F2010%2F02%2F17%2Fclean-excel-data-with-trim-and-substitute%2F&amp;style=compact ' height='20' width='90' frameborder='0' scrolling='no'></iframe></td> <td><script type="text/javascript"> var fbShare = {size:'small'}</script><script type="text/javascript" src="http://widgets.fbshare.me/files/fbshare.js"></script></td></table></div><!-- This is a HTML comment, it will not display in any page. Feel free to remove this comment if it cause any inconvenient to you.
	Thanks for using digg digg, please visit http://www.mkyong.com/blog/digg-digg-wordpress-plugin for any comments and ideas, 
	
    Author : Yong Mook Kim
    Website : http://www.mkyong.com
	-->]]></content:encoded>
			<wfw:commentRss>http://blog.contextures.com/archives/2010/02/17/clean-excel-data-with-trim-and-substitute/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
