<?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>ExcelMates.com Tutorials, Classes, Tips &#38; Tricks in Excel</title>
	<atom:link href="http://www.excelmates.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.excelmates.com</link>
	<description>Excel advice, tutorials and classes for professional users</description>
	<lastBuildDate>Thu, 19 Aug 2010 15:19:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>04 Nested Formulas/Functions (Nested IFs)</title>
		<link>http://www.excelmates.com/2010/08/14/04-nested-formulasfunctions-nested-ifs/</link>
		<comments>http://www.excelmates.com/2010/08/14/04-nested-formulasfunctions-nested-ifs/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 14:58:07 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[03 - Advanced Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=247</guid>
		<description><![CDATA[You&#8217;ve seen this already, I&#8217;m sure. A function within a function. Its like a world within a world. Well thats probably over the top, but for the uninitiated this can add a daunting layer of complexity to Excel. We&#8217;re going to start with a Nested IF, one of the most common uses for nested functions. [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.excelmates.com/wp-content/uploads/2010/08/galaxy.jpg"><img class="size-medium wp-image-248  aligncenter" title="galaxy" src="http://www.excelmates.com/wp-content/uploads/2010/08/galaxy-300x241.jpg" alt="" width="300" height="241" /></a><a href="http://www.excelmates.com/wp-content/uploads/2010/08/galaxy.jpg"></a></p>
<p>You&#8217;ve seen this already, I&#8217;m sure. A function within a function. Its like a world within a world. Well thats probably over the top, but for the uninitiated this can add a daunting layer of complexity to Excel.</p>
<p>We&#8217;re going to start with a <strong>Nested IF</strong>, one of the most common uses for nested functions. You might want to go back to our page on <a href="http://www.excelmates.com/2010/08/13/03-if/" target="_blank">basic IFs</a>, because we&#8217;ll be using a lot of the same concepts here.</p>
<p><strong>Here&#8217;s the scenario</strong>: you operate a store that sells grocery items (taxed at 5%) and non-grocery items (taxed at 10%). Furthermore, certain items have a 20% discount to the tax rate.</p>
<p>The file is here if you would like to follow along: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/Nested-IFs.xlsx">Nested IFs</a></p>
<p>Here&#8217;s the structure, then we&#8217;re going to break it out piece by piece:</p>
<p><img class="size-full wp-image-254 alignnone" title="NestedIFdiagram1" src="http://www.excelmates.com/wp-content/uploads/2010/08/NestedIFdiagram1.jpg" alt="" width="483" height="323" /></p>
<p>So there is our diagram, and with this structure we can get straight into the formula. Here&#8217;s a recap of each step:</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/1.jpg"><img class="alignleft size-full wp-image-255" title="1" src="http://www.excelmates.com/wp-content/uploads/2010/08/1.jpg" alt="" width="18" height="18" /></a> TEST1: Is the purchase a Grocery item?</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/2.jpg"><img class="alignleft size-full wp-image-256" title="2" src="http://www.excelmates.com/wp-content/uploads/2010/08/2.jpg" alt="" width="18" height="18" /></a> TRUE1: Purchase Type is Grocery</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/3.jpg"><img class="alignleft size-full wp-image-257" title="3" src="http://www.excelmates.com/wp-content/uploads/2010/08/3.jpg" alt="" width="18" height="18" /></a> TEST2: Does the item get a discount?</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/4.jpg"><img class="alignleft size-full wp-image-259" title="4" src="http://www.excelmates.com/wp-content/uploads/2010/08/4.jpg" alt="" width="18" height="18" /></a> TRUE2: then, the rate they pay is 5%*80%</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/5.jpg"><img class="alignleft size-full wp-image-260" title="5" src="http://www.excelmates.com/wp-content/uploads/2010/08/5.jpg" alt="" width="18" height="18" /></a> FALSE2: then, the rate they pay is 5%</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/6.jpg"><img class="alignleft size-full wp-image-261" title="6" src="http://www.excelmates.com/wp-content/uploads/2010/08/6.jpg" alt="" width="18" height="18" /></a> FALSE1: Purchase Type is Non-Grocery</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/7.jpg"><img class="alignleft size-full wp-image-262" title="7" src="http://www.excelmates.com/wp-content/uploads/2010/08/7.jpg" alt="" width="18" height="18" /></a> TEST3: Does the non-grocery item get a discount?</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/8.jpg"><img class="alignleft size-full wp-image-263" title="8" src="http://www.excelmates.com/wp-content/uploads/2010/08/8.jpg" alt="" width="18" height="18" /></a> TRUE3: then, the rate they pay is 10% * 80%</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/9.jpg"><img class="alignleft size-full wp-image-258" title="9" src="http://www.excelmates.com/wp-content/uploads/2010/08/9.jpg" alt="" width="18" height="18" /></a> FALSE3: then, the rate they pay is 10%</p>
<p>Let&#8217;s put it all together:</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/NestedIFdiagram2.jpg"><img class="alignnone size-full wp-image-269" title="NestedIFdiagram2" src="http://www.excelmates.com/wp-content/uploads/2010/08/NestedIFdiagram2.jpg" alt="" width="583" height="98" /></a></p>
<p>And here&#8217;s how it would look in Excel:</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/NestedIFdiagram3.jpg"><img class="alignnone size-full wp-image-270" title="NestedIFdiagram3" src="http://www.excelmates.com/wp-content/uploads/2010/08/NestedIFdiagram3.jpg" alt="" width="735" height="152" /></a></p>
<p>There you have it! A Nested IF.</p>
<p><em>Note: Excel is currently limited to 7 nested IF functions. There are a number of ways to get around this that I will detail in a later post.</em></p>
<p><em><span style="font-style: normal;"><strong><span style="text-decoration: underline;">Other Nested Functions</span></strong></span></em></p>
<p><em><span style="font-style: normal;">Remember that Nested functions aren&#8217;t limited to IF. ExcelMates has a bunch of examples that show various nested functions:</span></em></p>
<ul>
<li>IF, ROUND and RAND to do a <a href="http://www.excelmates.com/2010/07/09/test-blog-post/">Coin Toss</a></li>
<li>RIGHT, LEFT, LEN, and FIND to flip a name from <a href="http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/">Last, First to First Last</a></li>
<li>All sorts of stuff in a<a href="http://www.excelmates.com/2010/08/09/personal-budget-in-excel/"> Personal Budget</a></li>
</ul>
<p>Try it out. If you get stuck, you can always get<a href="mailto:ben@excelmates.com"> in touch</a>.</p>
<p>Posted by Ben Korin</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/14/04-nested-formulasfunctions-nested-ifs/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/14/04-nested-formulasfunctions-nested-ifs/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/14/04-nested-formulasfunctions-nested-ifs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>03 IF&#8230;</title>
		<link>http://www.excelmates.com/2010/08/13/03-if/</link>
		<comments>http://www.excelmates.com/2010/08/13/03-if/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 20:55:17 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[03 - Advanced Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=225</guid>
		<description><![CDATA[I&#8217;m tempted to get heady and try quoting Rudyard Kipling or an old Greek dude like Socrates or Aristotle, but then you&#8217;ll probably just read somebody else&#8217;s blog, because after all you&#8217;re only interested in Excel&#8217;s IF&#8230; Anyway, this post will refer to &#8220;logic tests&#8221; throughout. If you need a refresher check out our Simple Logic post. IF [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-medium wp-image-226   aligncenter" title="bill-and-ted-socrates1" src="http://www.excelmates.com/wp-content/uploads/2010/08/bill-and-ted-socrates1-300x172.jpg" alt="" width="300" height="172" /></p>
<p>I&#8217;m tempted to get heady and try quoting <a href="http://www.kipling.org.uk/poems_if.htm" target="_blank">Rudyard Kipling</a> or an old Greek dude like Socrates or <a href="http://plato.stanford.edu/entries/aristotle-logic/" target="_blank">Aristotle</a>, but then you&#8217;ll probably just read somebody else&#8217;s blog, because after all you&#8217;re only interested in Excel&#8217;s IF&#8230;</p>
<p>Anyway, this post will refer to &#8220;logic tests&#8221; throughout. If you need a refresher check out our <a href="http://www.excelmates.com/2010/07/11/03-simple-logic/" target="_blank">Simple Logic </a>post.</p>
<p><strong><span style="text-decoration: underline;">IF<br />
</span></strong>Let&#8217;s start with the syntax:<br />
=IF(<span style="color: #ff0000;"> logical test </span>, <span style="color: #ff0000;">what to do if true</span> , <span style="color: #ff0000;">what to do if false</span> )</p>
<p>At the most basic level, IF is easy: you perform a logic test, and then you tell Excel what to do if the test is TRUE and what to do if the test is FALSE. Its even easier if you follow <strong>ExcelMates</strong> <strong>method:</strong></p>
<ol>
<li>Set up the problem. Take a minute to think how you can test the problem. Look for phrases like &#8220;do [something] if&#8230;&#8221; or &#8220;do this when this is [true/false]&#8230;&#8221; Another helpful clue is when you see &#8220;condition&#8221; or something similar like &#8220;conditional&#8221;, &#8220;conditionality&#8221;, &#8220;based on&#8221;, &#8220;criteria&#8221;, &#8220;according to&#8221;, etc. Finally, &#8220;if&#8221; is naturally a great clue for a logic test!</li>
<li>Map it out with a decision tree. This will help identify if your logic is sound (<em>this is especially important when we start using nested IFs</em>)<br />
<img class="alignnone size-full wp-image-231" title="Ifdiagram1" src="http://www.excelmates.com/wp-content/uploads/2010/08/Ifdiagram1.jpg" alt="" width="465" height="188" /></li>
<li>Determine how you want the result to be presented. For example, it could be a message (&#8220;Too High&#8221;) or a number (10% or $100 or 35).</li>
<li>Put it into Excel =IF(TEST,TRUE,FALSE)</li>
</ol>
<p><strong>Let&#8217;s look at a couple of examples:</strong></p>
<p>(<strong>Example 1</strong>) You have two shipping rates depending on the weight of a package. If the package weighs less than 10kg the shipping cost is $5; if it weighs more than 10kg the shipping cost is $7.50.</p>
<ol>
<li>First step: what are we really asking here? We can pick out two conditions from the problem. The first is that we charge $5 if the package weighs more than 10kg. The second is that we charge $7.50 if the package weighs 10kg or more.  That&#8217;s a logic test: &#8220;does the package weigh more or less than 10kg?&#8221; or in Excel terms: <strong>[weight]&gt;=10</strong></li>
<li>Next: Diagram it out<br />
<a href="http://www.excelmates.com/wp-content/uploads/2010/08/Ifdiagram21.jpg"><img class="alignnone size-full wp-image-233" title="Ifdiagram2" src="http://www.excelmates.com/wp-content/uploads/2010/08/Ifdiagram21.jpg" alt="" width="466" height="180" /></a><a href="http://www.excelmates.com/wp-content/uploads/2010/08/Ifdiagram2.jpg"></a></li>
<li>In this case, the best way to present the data is with the resulting shipping cost.</li>
<li>Put it into Excel: =IF([weight]&gt;=10,7.5,5)<br />
<a href="http://www.excelmates.com/wp-content/uploads/2010/08/Ifexample1.jpg"><img class="alignnone size-full wp-image-236" title="Ifexample1" src="http://www.excelmates.com/wp-content/uploads/2010/08/Ifexample1.jpg" alt="" width="371" height="231" /></a></li>
</ol>
<p>If you want to see this in Excel click on the tab labeled &#8220;Example 1&#8243; in <a href="http://www.excelmates.com/wp-content/uploads/2010/08/IF-examples1.xls">IF examples</a></p>
<p><em>Note: you could have easily flipped the equality in the test by saying: [weight] &lt; 10. Neither way is necessarily better, whichever you prefer.</em></p>
<p>(<strong>Example 2</strong>) An employee in a members-only store is trying to calculate the price that various customers should pay based on their membership type (either Basic or Premium). Basic members receive a 10% discount, and Premium members receive a 20% discount.</p>
<ol>
<li>What is the customer&#8217;s membership type? Here we can say &#8220;is the member basic?&#8221; because we know that alternatively they must be premium.</li>
<li>Diagram:<br />
<a href="http://www.excelmates.com/wp-content/uploads/2010/08/Ifdiagram3.jpg"><img class="alignnone size-full wp-image-237" title="Ifdiagram3" src="http://www.excelmates.com/wp-content/uploads/2010/08/Ifdiagram3.jpg" alt="" width="511" height="216" /></a></li>
<li>We want to return the final price, not the discount. So for Basic, that would be original price multiplied by 90%. For Premium it would be original price multiplied by 80%</li>
<li>Put it in Excel:<br />
<a href="http://www.excelmates.com/wp-content/uploads/2010/08/Ifexample2.jpg"><img class="alignnone size-full wp-image-238" title="Ifexample2" src="http://www.excelmates.com/wp-content/uploads/2010/08/Ifexample2.jpg" alt="" width="548" height="212" /></a></li>
</ol>
<p>If you want to see this in Excel click on the tab labeled &#8220;Example 2&#8243; in <a href="http://www.excelmates.com/wp-content/uploads/2010/08/IF-examples2.xls">IF examples</a> <em>(the file also has a detailed breakdown of an extra example on the tab &#8220;Example 3&#8243;)</em></p>
<p><strong>Next steps:</strong></p>
<p>In these basic IF statements you only have 1 test and 2 results (TRUE, FALSE). You might be wondering what you would do if you need multiple tests (if the package weighs less than 10, between 10 and 20 and greater than 20, for example). Check out ExcelMates&#8217; coverage of<a href="http://www.excelmates.com/2010/08/14/04-nested-formulasfunctions-nested-ifs/"> Nested IFs!</a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/13/03-if/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/13/03-if/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/13/03-if/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>02 Lookup Functions (VLOOKUP, HLOOKUP)</title>
		<link>http://www.excelmates.com/2010/08/11/02-lookup-functions/</link>
		<comments>http://www.excelmates.com/2010/08/11/02-lookup-functions/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 23:37:23 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[03 - Advanced Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=187</guid>
		<description><![CDATA[One of the reasons why Excel is a great piece of business software is that it is not simply about mathematical calculations – it also integrates features that are normally from word processors (formatting and publishing) and database tools (like Access querying). If you’ve ever been forced to manually link cells between tables or go [...]]]></description>
			<content:encoded><![CDATA[<p>One of the reasons why Excel is a great piece of business software is that it is not simply about mathematical calculations – it also integrates features that are normally from word processors (formatting and publishing) and database tools (like Access querying).</p>
<p>If you’ve ever been forced to manually link cells between tables or go line-by-line to find a piece of data, you can probably benefit from one of Excel’s most commonly used “lookup” functions. We&#8217;re going to look at a couple of simple examples and we&#8217;ll wrap up with a real-world example using data from the World Bank.</p>
<p>There are three types of lookup functions in Excel:</p>
<ul>
<li>VLOOKUP</li>
<li>HLOOKUP</li>
<li>LOOKUP (we are not going to cover this because it does not apply to Excel 2003 or 2007)</li>
</ul>
<p><strong><span style="text-decoration: underline;">VLOOKUP</span></strong></p>
<p>It might seem scary at first, but I promise that VLOOKUP is actually very easy once you understand how to set it up.</p>
<p>We&#8217;re going to a very small set of data to illustrate the concept and then show you how it can apply to larger data sets in the real world. To start, here is a sample set of employee information that you might find in standard set of HR or financial data. In this case, there are only three data points, but remember that what we show you is scalable &#8211; it will work for much larger sets as well.</p>
<p><span style="text-decoration: underline;">Employee Payroll Data:</span></p>
<table style="cursor: default;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="103" valign="top"><strong>Name</strong></td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="66" valign="top"><strong>Pay rate</strong></td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="120" valign="top"><strong>Phone Number</strong></td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="156" valign="top"><strong>Office Location</strong></td>
</tr>
<tr>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="103" valign="top">Joe Smith</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="66" valign="top">$15</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="120" valign="top">123-345-5678</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="156" valign="top">New York City, USA</td>
</tr>
<tr>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="103" valign="top">Jane Doe</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="66" valign="top">$25</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="120" valign="top">987-654-3210</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="156" valign="top">Washington, DC USA</td>
</tr>
<tr>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="103" valign="top">John Doe</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="66" valign="top">$20</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="120" valign="top">111-222-3333</td>
<td style="color: #000000; font-size: 11px; cursor: text; margin: 8px;" width="156" valign="top">London, England UK</td>
</tr>
</tbody>
</table>
<p>Before we get ahead of ourselves, let&#8217;s look at the basic set up first:</p>
<p>=VLOOKUP(<em> <span style="color: #ff0000;">what to look for</span> , <span style="color: #ff0000;">where to look</span> , <span style="color: #ff0000;">column w/ desired data</span> , <span style="color: #ff0000;">match type</span></em><em> </em>)</p>
<p>Here&#8217;s a scenario: you have a separate document where you have to calculate holiday pay for specific individuals (problem: what is the employee&#8217;s pay rate). In this case, let&#8217;s say you need to calculate the amount for Jane Doe. To do this manually you could link back to this payroll data by searching through the payroll table row-by-row&#8230;. or&#8230;. you could use VLOOKUP instead!</p>
<p>Back to the set up:</p>
<p><strong>=VLOOKUP( </strong><span style="color: #ff0000;"><strong>what to look for , </strong><span style="color: #00ff00;"><span style="color: #339966;"><strong>where to look</strong></span><strong> </strong></span><strong>, </strong><span style="color: #3366ff;"><strong>column w/ desired data</strong></span><strong> , </strong><span style="color: #993366;"><strong>match type</strong></span><span style="color: #993366;"><strong> </strong></span><strong>)</strong></span></p>
<p><span style="color: #ff0000;">What to look for -&gt; <span style="color: #000000;">in this case, its the name of the employee (Jane Doe)</span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;"><span style="color: #339966;">Where to look -&gt;</span> you have a payroll table that connects an employee&#8217;s name with their pay rate</span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;"><span style="color: #3366ff;">Column with desired data -&gt;</span> this refers to where the desired information is on the table. In our case, the pay rate is in the second column, so this would be 2. <em>Note: this is the column number in the table that you reference, not the column in the whole sheet. You can check yourself by counting the columns starting from the </em><strong><em>leftmost </em></strong><em>column in the range.</em></span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;"><span style="color: #993366;">match type -&gt; </span>gives Excel a condition for matching your &#8220;what to look for&#8221; with the &#8220;where to look&#8221; table. Here&#8217;s the way that I think about it:</span></span></p>
<ul>
<li><span style="color: #000000;">0 (Zero) or FALSE means you only want an exact match. This is by far the most common, and my personal recommendation for almost all applications</span></li>
<li><span style="color: #000000;">1 or TRUE or Omitted will find the closest match. </span><em><span style="color: #000000;">Note: this only works with numbers. Excel can&#8217;t find the closest match with text lookups.</span></em></li>
</ul>
<tbody></tbody>
<p><span style="color: #000000;">Putting it together, we have a dynamic way to &#8220;query&#8221; the data table and get the information that we&#8217;re looking for. Here&#8217;s how it looks in Excel:</span></p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/02LOOKUPs.jpg"><img class="alignnone size-full wp-image-202" title="02LOOKUPs" src="http://www.excelmates.com/wp-content/uploads/2010/08/02LOOKUPs.jpg" alt="" width="902" height="373" /></a></p>
<p><span style="font-size: small;"><span style="line-height: normal;"><span style="color: #000000;">Now say you have to John Doe&#8217;s phone number. How do you think that you would do that? You can simply change the name in the &#8220;what to look for&#8221; line and change the column number to 3 (Phone numbers are in the third column).</span></span></span></p>
<p><span style="color: #000000;">Check out this example in Excel: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/VLOOKUP.xls">VLOOKUP</a></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;"><strong><span style="text-decoration: underline;"><span style="color: #000000;">HLOOKUP</span></span></strong></span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;"><span style="color: #000000;">We&#8217;re going to go through this quickly because HLOOKUP is very similar to VLOOKUP and its also much less common. The fact is that for ease of use, most data is presented vertically (headers on top, data falling onto rows). We&#8217;ll use the same employee data, but now orient it differently.</span></span></span></p>
<p><span style="text-decoration: underline;"><span style="color: #000000;">Employee Payroll Data:</span></span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="103" valign="top"><span style="color: #000000;">Name</span></td>
<td width="66" valign="top"><span style="color: #000000;">Joe Smith</span></td>
<td width="120" valign="top"><span style="color: #000000;">Jane Doe</span></td>
<td width="156" valign="top"><span style="color: #000000;">John Doe</span></td>
</tr>
<tr>
<td width="103" valign="top"><span style="color: #000000;">Pay rate</span></td>
<td width="66" valign="top"><span style="color: #000000;">$15</span></td>
<td width="120" valign="top"><span style="color: #000000;">$25</span></td>
<td width="156" valign="top"><span style="color: #000000;">$20</span></td>
</tr>
<tr>
<td width="103" valign="top"><span style="color: #000000;">Phone Number</span></td>
<td width="66" valign="top"><span style="color: #000000;">123-345-5678</span></td>
<td width="120" valign="top"><span style="color: #000000;">987-654-3210</span></td>
<td width="156" valign="top"><span style="color: #000000;">111-222-3333</span></td>
</tr>
<tr>
<td width="103" valign="top"><span style="color: #000000;">Office Location</span></td>
<td width="66" valign="top"><span style="color: #000000;">New York City, USA</span></td>
<td width="120" valign="top"><span style="color: #000000;">Washington, DC USA</span></td>
<td width="156" valign="top"><span style="color: #000000;">London, England UK</span></td>
</tr>
</tbody>
</table>
<p><span style="font-size: small;"><span style="line-height: normal;">Here, the headers are on the rows and the data falls into columns, moving out to the right.</span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;">Back in Excel, everything is pretty much the same, except that you&#8217;re now returning the row number instead of the column number.</span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;"><a href="http://www.excelmates.com/wp-content/uploads/2010/08/02LOOKUPs2.jpg"><img class="alignnone size-full wp-image-210" title="02LOOKUPs2" src="http://www.excelmates.com/wp-content/uploads/2010/08/02LOOKUPs2.jpg" alt="" width="882" height="358" /></a></span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;">There you have it! And if you want to see it in Excel look here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/HLOOKUP.xls">HLOOKUP</a></span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;">Before we finish this post, I promised a real example with real data.</span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;"><strong><span style="text-decoration: underline;">VLOOKUP in the real world: </span><span style="text-decoration: underline;"><em>Doing Business </em></span><span style="text-decoration: underline;">data from the World Bank</span></strong></span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;">The World Bank publishes tons of data every year, and one of my personal favorites is the <em>Doing Business</em> report. I recommend checking out the <a href="http://data.worldbank.org/data-catalog">WB&#8217;s data website</a> if you&#8217;re interested in other global economic data.</span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;">If you want to follow along, download the raw data (<em>Doing Business 2010</em>) in Excel format here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/doingbusiness.xls">Doing Business</a></span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;">I&#8217;m also going to throw in an added trick (Data Validation lists) that we&#8217;ll cover in another post. Plus the result has a VLOOKUP <em>within </em>a VLOOKUP! So download the solution here, and try playing around with it: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/VLOOKUP-Example.xls">VLOOKUP Example</a></span></span></p>
<p><span style="line-height: normal; font-size: x-small;"><span style="font-size: small;"><span style="line-height: 19px;">As always, if you have any questions, get in <a href="mailto:ben@excelmates.com">touch</a>.</span></span></span></p>
<p><span style="font-size: small;"><span style="line-height: normal;"><br />
</span></span></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/11/02-lookup-functions/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/11/02-lookup-functions/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/11/02-lookup-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>01 CELL function</title>
		<link>http://www.excelmates.com/2010/08/10/01-cell-function/</link>
		<comments>http://www.excelmates.com/2010/08/10/01-cell-function/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 22:37:57 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[03 - Advanced Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=174</guid>
		<description><![CDATA[In the course of creating Excel spreadsheets, you might find from time to time that you want to display information about the file itself. CELL is often the easiest way to do this. The CELL function allows you to return information about a particular cell in the sheet. The basic format is pretty straight-forward. Put [...]]]></description>
			<content:encoded><![CDATA[<p>In the course of creating Excel spreadsheets, you might find from time to time that you want to display information about the file itself.</p>
<p>CELL is often the easiest way to do this. The CELL function allows you to return information about a particular cell in the sheet.</p>
<p>The basic format is pretty straight-forward. Put the information type (in quotation marks), followed by the cell that you want to show information about (cell reference or range reference).</p>
<p>=CELL(“<span style="color: #ff0000;"><em>info type</em></span>”,<span style="color: #ff0000;"><em>cell or range reference</em></span>)</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/CELLlist.jpg"><img class="alignnone size-full wp-image-176" title="CELLlist" src="http://www.excelmates.com/wp-content/uploads/2010/08/CELLlist.jpg" alt="" width="260" height="320" /></a></p>
<p><em>Note: No reference returns information about whichever cell you last changed.</em></p>
<p>There is a fairly extensive list of info types. Most of them are not really useful (in my opinion), but a few of them pop up in my spreadsheets periodically.</p>
<ul>
<li>Address (cell reference, ex: $P$5, or first cell if the reference is a range)</li>
<li>Column (col)</li>
<li>Row</li>
<li>Filename</li>
<li>Contents (what’s in the cell referenced, or the first cell in the range)</li>
</ul>
<p>See examples of these in Excel here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/CELL-function-examples.xls">CELL function examples</a></p>
<p>There are a number of other info types that deal with the format of the cell, but I don’t find these particularly useful. Tech on the Net has a really good resource that describes each of these in detail. I recommend checking out their resource at <a href="http://www.techonthenet.com/excel/formulas/cell.php">http://www.techonthenet.com/excel/formulas/cell.php</a>.</p>
<ul>
<li>Color</li>
<li>Format (a complete list of formats is available from)</li>
<li>Parentheses</li>
<li>Prefix</li>
<li>Protect</li>
<li>Type</li>
<li>Width</li>
</ul>
<p><strong><span style="text-decoration: underline;">Isolating either the Workbook or Worksheet name</span></strong></p>
<p>When you use CELL and &#8220;filename&#8221; you get back information about the file in this format:</p>
<p><span style="color: #ff0000;">(1)    File’s saved location</span></p>
<p><span style="color: #00ff00;">(2)    Workbook name, surrounded by brackets []</span></p>
<p><span style="color: #3366ff;">(3)    Worksheet name</span></p>
<p>So a typical reference would look like this:</p>
<p><span style="color: #ff0000;">C:\Documents and Settings\&#8230;\My Documents\&#8230;\</span><span style="color: #00ff00;">[CELL function examples.xlsx]</span><span style="color: #3366ff;">Sheet1</span></p>
<p>If we want just the workbook name, we can use text functions <a href="http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/">(refresher here if needed!) </a>to break that out into each of the elements. Here are two examples:</p>
<p><strong>Breakout the workbook name</strong></p>
<p>=MID(CELL(&#8220;filename&#8221;,A1),FIND(&#8220;[",CELL("filename",A1))+1,FIND("]&#8220;,CELL(&#8220;filename&#8221;,A1))-FIND(&#8220;[",CELL("filename",A1))-1)</p>
<p><em>Note: If you are trying to paste this into a spreadsheet, you might have to fix the quotation marks. Sometimes Excel doesn't pick up on them...</em></p>
<p>This formula uses MID to isolate the workbook by finding the brackets that surround the name. See the example in Excel that breaks it out step-by-step here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/CELL-function-examples.xls">CELL function examples</a></p>
<p><strong>Breakout the worksheet name</strong></p>
<p>=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-FIND("]&#8220;,CELL(&#8220;filename&#8221;,A1)))</p>
<p><em>Note: If you are trying to paste this into a spreadsheet, you might have to fix the quotation marks. Sometimes Excel doesn&#8217;t pick up on them&#8230;</em></p>
<p>This formula uses RIGHT to isolate the worksheet name by finding the closing bracket and the length. See the example in Excel that breaks it out step-by-step here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/CELL-function-examples.xls">CELL function examples</a></p>
<p><em>Note: if you&#8217;re not getting any result with &#8220;filename&#8221; remember that it will only work with a saved file. If you haven&#8217;t saved the file yet, there is no filename and thus no result from =CELL(&#8220;Filename&#8221;)!</em></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/10/01-cell-function/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/10/01-cell-function/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/10/01-cell-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal Budget in Excel</title>
		<link>http://www.excelmates.com/2010/08/09/personal-budget-in-excel/</link>
		<comments>http://www.excelmates.com/2010/08/09/personal-budget-in-excel/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 20:13:42 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[Tips and News]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=169</guid>
		<description><![CDATA[One very common application of Excel is building budgets – from simple personal budgets to complicated business budgets.  It is also a very good teaching tool, because even a simple budget will require some knowledge of Formulas, formatting, etc. (plus bells and whistles, of course!)  I’ve created an example of a personal budget here that [...]]]></description>
			<content:encoded><![CDATA[<p>One very common application of Excel is building budgets – from simple personal budgets to complicated business budgets.</p>
<p> It is also a very good teaching tool, because even a simple budget will require some knowledge of Formulas, formatting, etc. (plus bells and whistles, of course!)</p>
<p> I’ve created <a href="http://www.excelmates.com/wp-content/uploads/2010/08/ExcelMates-Personal-Budget.xlsx">an example of a personal budget </a>here that makes use of a number of concepts covered in ExcelMates coursework, including:</p>
<ul>
<li>Conditional formatting (I1:L2 on Budget tab)</li>
<li>Basic Math &amp; Logic (throughout)</li>
<li><a href="http://www.excelmates.com/2010/08/13/03-if/" target="_blank">IF</a> (Annual $ calculation in Column F on Budget tab)</li>
<li>ISERROR (Annual $ calculation in Column F on Budget tab)</li>
<li>INDIRECT (Annual $ calculation in Column F on Budget tab)</li>
<li>ROW (Annual $ calculation in Column F on Budget tab)</li>
<li><a href="http://www.excelmates.com/2010/08/11/02-lookup-functions/" target="_blank">VLOOKUP</a> (Annual $ calculation in Column F on Budget tab)</li>
<li>Basic Formatting (Borders, colors, number types)</li>
<li>Data Validation (Column D on Budget tab)</li>
<li><a href="http://www.excelmates.com/2010/07/12/02-some-basic-functions-part-1-sum-average-max-min/" target="_blank">SUM </a>(in Total rows on Budget tab)</li>
<li>Named Ranges (see Tables tab)</li>
<li>Freeze panes (Budget tab – row 2 and higher)</li>
</ul>
<p> So try it out <a href="http://www.excelmates.com/wp-content/uploads/2010/08/ExcelMates-Personal-Budget.xlsx">ExcelMates Personal Budget</a>. If you have any questions, poke around the site or <a href="mailto:ben@excelmates.com">send us an email</a>.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/09/personal-budget-in-excel/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/09/personal-budget-in-excel/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/09/personal-budget-in-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel quick tip: change names from &#8220;Last, First&#8221; to &#8220;First Last&#8221;</title>
		<link>http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/</link>
		<comments>http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 03:27:05 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[Tips and News]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=137</guid>
		<description><![CDATA[I&#8217;m sure you&#8217;ve seen this before: you get a load of data with names shown &#8220;First Last&#8221; or &#8220;Last, First&#8221;, but you need it the other way&#8230; Good news! Excel can do that. Before we get into the details, you&#8217;ll need to refresh yourself of some of the text functions, namely: =RIGHT =LEFT =LEN =FIND [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure you&#8217;ve seen this before: you get a load of data with names shown &#8220;First Last&#8221; or &#8220;Last, First&#8221;, but you need it the other way&#8230;</p>
<p>Good news! Excel can do that. Before we get into the details, you&#8217;ll need to refresh yourself of some of the text functions, namely:</p>
<ul>
<li>=RIGHT</li>
<li>=LEFT</li>
<li>=LEN</li>
<li>=FIND</li>
<li>Concatenating</li>
</ul>
<p>Check out our lesson on <a href="http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/" target="_blank">Text Functions</a> if you aren&#8217;t familiar with these functions.</p>
<p>Ok, so let&#8217;s start with a simple name in &#8220;Last, First&#8221; format: Smith, Joe</p>
<p>I&#8217;m going to start with the solution:</p>
<p>=RIGHT(<span style="color: #ff0000;">text</span>,LEN(<span style="color: #ff0000;">text</span>)-FIND(&#8220;,&#8221;,<span style="color: #ff0000;">text</span>,1)-1)&amp;&#8221; &#8220;&amp;LEFT(<span style="color: #ff0000;">text</span>,FIND(&#8220;,&#8221;,<span style="color: #ff0000;">text</span>,1)-1)</p>
<p>and break it down into its three components:</p>
<p><strong>(1) What&#8217;s the first name?</strong></p>
<p>﻿﻿RIGHT(<span style="color: #ff0000;">text</span>,LEN(<span style="color: #ff0000;">text</span>)-FIND(&#8220;,&#8221;,<span style="color: #ff0000;">text</span>,1)-1)</p>
<p>What&#8217;s all that? Well we need to know how many characters long the first name is.  Once we know that, we can use RIGHT to isolate it. So, we get the total length using LEN, then subtract the position of the comma and subtract 1 to exclude the space.</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/firstlast1.jpg"><img class="alignnone size-full wp-image-161" title="firstlast1" src="http://www.excelmates.com/wp-content/uploads/2010/08/firstlast1.jpg" alt="" width="439" height="140" /></a></p>
<p><strong>(2) What&#8217;s the last name?</strong></p>
<p>LEFT(<span style="color: #ff0000;">text</span>,FIND(&#8220;,&#8221;,<span style="color: #ff0000;">text</span>,1)-1)</p>
<p>Same thing with as before: FIND the comma and subtract 1 (because we don&#8217;t want to include the comma in the count).</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/firstlast2.jpg"><img class="alignnone size-full wp-image-162" title="firstlast2" src="http://www.excelmates.com/wp-content/uploads/2010/08/firstlast2.jpg" alt="" width="434" height="144" /></a></p>
<p><strong>(3) Combine and put a space between the first and last name</strong></p>
<p>&amp;&#8221; &#8220;&amp;</p>
<p>To see this example and the reverse (&#8220;First Last&#8221; to &#8220;Last, First&#8221;), check out the example in Excel here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/LastFirstFirstLast.xlsx">LastFirstFirstLast</a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>05 Text Functions (LEFT, RIGHT, LEN, FIND, MID, Concatenating)</title>
		<link>http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/</link>
		<comments>http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 02:06:27 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[02 - Basic Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=146</guid>
		<description><![CDATA[Text functions are some of the unsung heroes of Excel. They often get overlooked because they don&#8217;t deal with numbers, but text functions will pop up all over the place. So let&#8217;s get into it. We&#8217;re going to cover: =RIGHT() =LEFT() =LEN() =FIND() =MID() Concatenating Let&#8217;s start with some basics. We&#8217;re going to use a [...]]]></description>
			<content:encoded><![CDATA[<p>Text functions are some of the unsung heroes of Excel. They often get overlooked because they don&#8217;t deal with numbers, but text functions will pop up all over the place. So let&#8217;s get into it. We&#8217;re going to cover:</p>
<ul>
<li>=RIGHT()</li>
<li>=LEFT()</li>
<li>=LEN()</li>
<li>=FIND()</li>
<li>=MID()</li>
<li>Concatenating</li>
</ul>
<p>Let&#8217;s start with some basics. We&#8217;re going to use a phrase in each of the examples to make things easier: &#8220;Red Wine&#8221;</p>
<p>It&#8217;s obvious that this phrase, or any other word or phrase, is the combination of a certain number of characters, arranged in a certain way. Simple enough. Let&#8217;s break it down further:</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/05textfunctionsRedWine.jpg"><img class="alignnone size-full wp-image-148" title="05textfunctionsRedWine" src="http://www.excelmates.com/wp-content/uploads/2010/08/05textfunctionsRedWine.jpg" alt="" width="510" height="139" /></a></p>
<p>Knowing this information, we can now ask Excel to tell us about the string using formulas.</p>
<p>=LEN(<span style="color: #ff0000;"><em>cell reference or text</em></span>)    Returns the length (number of characters) in the text string</p>
<p>=RIGHT(<span style="color: #ff0000;"><em>cell reference or text, # of characters</em></span>)     Returns the rightmost X number of characters in the text string</p>
<p>=LEFT(<span style="color: #ff0000;"><em>cell reference or text, # of characters</em></span>)     Returns the leftmost X number of characters in the text string</p>
<p>Looking back at our phrase &#8220;Red Wine&#8221;, =LEN(&#8220;Red Wine&#8221;) would result in 8. Similarly, LEFT(&#8220;Red Wine&#8221;,3) would result in &#8220;Red&#8221;</p>
<p>There are still a couple more functions to cover: FIND and MID.</p>
<p>=FIND(<span style="color: #ff0000;"><em>what to look for, cell reference of text to look in, starting position</em></span>)     Returns the position of a character in a text string</p>
<p>=MID(<em><span style="color: #ff0000;">cell reference of text to look in, starting position, # of characters</span>)</em> Returns a specified number of characters beginning from a specified position</p>
<p>These two are a little bit more complicated, so I&#8217;ll try to break it down further. Say that we want to know where &#8220;W&#8221; falls in our phrase &#8220;Red Wine&#8221;. That would look like this:</p>
<p><strong>=FIND(&#8220;W&#8221;,&#8221;Red Wine&#8221;,1)</strong> [note that the "1" at the end is optional, as FIND will default to 1 unless you specify otherwise]</p>
<p>The result from Excel is 5, because &#8220;W&#8221; is the fifth character (from left to right) in the string:</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/05textfunctionsRedWineFIND1.jpg"><img class="alignnone size-full wp-image-149" title="05textfunctionsRedWineFIND1" src="http://www.excelmates.com/wp-content/uploads/2010/08/05textfunctionsRedWineFIND1.jpg" alt="" width="542" height="67" /></a></p>
<p>Now MID is similar: let&#8217;s say that we want to find out what the 5 characters beginning with e (position 2) are:</p>
<p><strong>=MID(&#8220;Red Wine&#8221;,2,5)</strong></p>
<p>The result from Excel is &#8220;ed Wi&#8221;</p>
<p><a href="http://www.excelmates.com/wp-content/uploads/2010/08/05textfunctionsRedWineMID1.jpg"><img class="alignnone size-full wp-image-152" title="05textfunctionsRedWineMID" src="http://www.excelmates.com/wp-content/uploads/2010/08/05textfunctionsRedWineMID1.jpg" alt="" width="536" height="126" /></a></p>
<p>Also remember that while we were looking for single characters (like &#8220;W&#8221;) you can also use FIND to look for multiple characters like &#8220;wine&#8221;.</p>
<p>Before we finish up the discussion of text functions, let&#8217;s look quickly at concatenating. Concatenating is combining characters together to form a single text. You can accomplish this using either the CONCATENATE formula, or the ampersand (&amp;).</p>
<p>For example, say you have four words: United, States, of, America.</p>
<p>Using CONCATENATE, you can combine each element separated by commas. You can add spaces by putting a space surrounded by quotation marks &#8221; &#8220;.</p>
<p><strong>=CONCATENATE(&#8220;United&#8221;,&#8221; &#8220;,&#8221;States&#8221;,&#8221; &#8220;,&#8221;of&#8221;,&#8221; &#8220;,&#8221;America&#8221;)</strong></p>
<p>Or&#8230;</p>
<p><strong>=&#8221;United&#8221;&amp;&#8221; &#8220;&amp;&#8221;States&#8221;&amp;&#8221; &#8220;&amp;&#8221;of&#8221;&amp;&#8221; &#8220;&amp;&#8221;America&#8221;</strong></p>
<p>Either way, you get: &#8220;United States of America&#8221; as the result!</p>
<p>See examples of these formulas in Excel here: <a href="http://www.excelmates.com/wp-content/uploads/2010/08/Text-Functions.xlsx">Text Functions</a></p>
<p><em>Note: Remember that spaces count! Also, each formula can be combined in other formulas!</em></p>
<p>If you want to see an example, try<a href="http://www.excelmates.com/2010/08/08/excel-quick-tip-change-names-from-last-first-to-first-last/"> this post </a>about changing how names appear in a list.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/08/05-text-functions-left-right-len-find-mid-concatenating/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Excel in the Real World &#8211; Manhattan Transit</title>
		<link>http://www.excelmates.com/2010/08/08/excel-in-the-real-world-manhattan-transit/</link>
		<comments>http://www.excelmates.com/2010/08/08/excel-in-the-real-world-manhattan-transit/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 00:29:10 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[Tips and News]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=139</guid>
		<description><![CDATA[I love hearing interesting ways that Excel is being used everyday &#8212; from simple things like making a personal budget or far more complicated things, like assessing the impact of transit prices on Manhattan&#8217;s traffic. Check out this article from Wired magazine about Charles Komanoff, the guru behind the &#8220;Balanced Transport Analyzer.&#8221; His model takes [...]]]></description>
			<content:encoded><![CDATA[<p>I love hearing interesting ways that Excel is being used everyday &#8212; from simple things like making a personal budget or far more complicated things, like assessing the impact of transit prices on Manhattan&#8217;s traffic.</p>
<p>Check out <a href="http://www.wired.com/magazine/2010/05/ff_komanoff_traffic/all/1" target="_blank">this article</a> from Wired magazine about Charles Komanoff, the guru behind the &#8220;Balanced Transport Analyzer.&#8221;</p>
<p>His model takes all sorts of variables into account, and by linking cells and forming relationships and functions, he is able to measure the traffic impact of changing a fare, adding a train, or any number of other inputs. What&#8217;s really interesting here is that nothing in this file is outlandishly complicated &#8212; these are all techniques that ExcelMates uses on a regular basis. In fact, most of the concepts are covered in our curriculum section and covered in our classes.</p>
<p>Download the file and see for yourself here: <a href="http://www.nnyn.org/kheelplan/BTA_1.1.xls">BTA</a>. And if you see something interesting and you want to learn more, let us <a href="mailto:ben@excelmates.com">know</a>!</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/08/excel-in-the-real-world-manhattan-transit/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/08/08/excel-in-the-real-world-manhattan-transit/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/08/08/excel-in-the-real-world-manhattan-transit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>04 Some Basic Functions, Part 2 (ROUND, TRUNC)</title>
		<link>http://www.excelmates.com/2010/07/14/04-some-basic-functions-part-2-round-trunc/</link>
		<comments>http://www.excelmates.com/2010/07/14/04-some-basic-functions-part-2-round-trunc/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 01:34:15 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[02 - Basic Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=132</guid>
		<description><![CDATA[To round off [pun intended] the discussion on basic functions, we&#8217;re going to look at two other number functions that might come in handy. =ROUND(cell reference or number,# digits to round) With round, you are telling Excel to take a number (let&#8217;s use 132.5678 as an example), and round to a certain digit. For example, [...]]]></description>
			<content:encoded><![CDATA[<p>To round off [pun intended] the discussion on basic functions, we&#8217;re going to look at two other number functions that might come in handy.</p>
<ul>
<li>=ROUND(<span style="color: #ff0000;">cell reference or number</span>,<span style="color: #ff0000;"># digits to round</span>)
<ul>
<li>With round, you are telling Excel to take a number (let&#8217;s use 132.5678 as an example), and round to a certain digit.</li>
<li>For example, if you wanted to round 132.5678 to the nearest whole number, you would put in =ROUND(132.5678,<strong><span style="color: #00ff00;">0</span></strong>)</li>
<li>The rest works much like you&#8217;d guess. Rounding to the nearest&#8230;
<ul>
<li>hundredth (two places to the right of the decimal point) would look like this =ROUND(132.5678,2)</li>
<li>tens (two places to the left of the decimal point) would like this =ROUND(132.5678,-2)</li>
</ul>
</li>
</ul>
</li>
<li>=TRUNC(<span style="color: #ff0000;">cell reference or number,# digits to truncate</span>)
<ul>
<li>Truncating is similar to rounding, but instead of rounding it simply chops off the number where you tell it to</li>
<li>Taking 132.5678 from the last example, rounding to the nearest whole number would give you 133. TRUNC, on the other hand, would give you 132.</li>
<li>Just like ROUND, you can TRUNC to the right or the left of the decimal place. If you want to truncate to the hundreds, it would look like this =TRUNC(132.5678,-2) and the result would simply be 100.</li>
</ul>
</li>
</ul>
<p>If you want to see how this looks in Excel, take a look at our example file here: <a href="http://www.excelmates.com/wp-content/uploads/2010/07/Basic-functions-Part-2-Excel-2007.xlsx">Basic functions, Part 2 (Excel 2007)</a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/07/14/04-some-basic-functions-part-2-round-trunc/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/07/14/04-some-basic-functions-part-2-round-trunc/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/07/14/04-some-basic-functions-part-2-round-trunc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>03 Counting Functions (COUNT, COUNTA, COUNTBLANK, COUNTIF, COUNTIFS)</title>
		<link>http://www.excelmates.com/2010/07/14/03-counting-functions-count-counta-countblank-countif-countifs/</link>
		<comments>http://www.excelmates.com/2010/07/14/03-counting-functions-count-counta-countblank-countif-countifs/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 01:07:45 +0000</pubDate>
		<dc:creator>benkorin</dc:creator>
				<category><![CDATA[02 - Basic Formulas]]></category>

		<guid isPermaLink="false">http://www.excelmates.com/?p=126</guid>
		<description><![CDATA[After SUM and the basic number functions, Counting functions are probably the next most common functions in Excel. Unlike SUM, which adds values together, COUNT(s) do exactly what you&#8217;d expect: they count! Here are the three basic types: =COUNT(cells or ranges) Counts the number of cells that contain a number =COUNTA(cells or ranges) Counts the [...]]]></description>
			<content:encoded><![CDATA[<p>After SUM and the basic number functions, Counting functions are probably the next most common functions in Excel. Unlike SUM, which adds values together, COUNT(s) do exactly what you&#8217;d expect: they count!</p>
<p>Here are the three basic types:</p>
<ul>
<li>=COUNT(<span style="color: #ff0000;">cells or ranges</span>)
<ul>
<li>Counts the number of cells that contain a number</li>
</ul>
</li>
<li>=COUNTA(<span style="color: #ff0000;">cells or ranges</span>)
<ul>
<li>Counts the number of cells with anything in them (numbers, text, etc.)</li>
</ul>
</li>
<li>=COUNTBLANK(<span style="color: #ff0000;">range</span>)
<ul>
<li>Counts the number of cells <em>without </em>anything in them (blank cells)</li>
<li><em>Note: for some reason, COUNTBLANK only works with one continuous range. No multiple selections on this one.</em></li>
</ul>
</li>
</ul>
<p>There are two other counting functions that are worth noting. These combine the functionality of COUNT and IF to create&#8230; COUNTIF!</p>
<ul>
<li>=COUNTIF(<span style="color: #ff0000;">range to count</span>,<span style="color: #ff0000;">criteria</span>)
<ul>
<li>COUNTIF allows you to give a criteria, for example, count a cell if it is equal to 5.</li>
<li>You can also use inequalities: the only difference is that you put the condition in quotation marks (&#8220;&gt;5&#8243;)</li>
</ul>
</li>
<li>=COUNTIFS(<span style="color: #ff0000;">criteria range 1,criteria 2,criteria range 2,criteria 2, etc&#8230;</span>)
<ul>
<li>COUNTIFS is a little more complicated. Instead of having only one criteria, you can choose 2 or more. So for example, with two criteria you could count anything within a range (one criteria &gt;, another &lt;), or in other words, count if a value is <em>between </em>two ends of a range.</li>
</ul>
</li>
</ul>
<p>Check out our spreadsheet with some real examples in Excel! <a href="http://www.excelmates.com/wp-content/uploads/2010/07/Counting-Functions-Excel-2007.xlsx">Counting Functions (Excel 2007)</a></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/07/14/03-counting-functions-count-counta-countblank-countif-countifs/" target="_blank"><img src="http://www.excelmates.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.excelmates.com/2010/07/14/03-counting-functions-count-counta-countblank-countif-countifs/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.excelmates.com/2010/07/14/03-counting-functions-count-counta-countblank-countif-countifs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
