<?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>Ms Office Tune Up &#187; Excel Formula</title>
	<atom:link href="http://www.msofficetuneup.com/category/excel-formula/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.msofficetuneup.com</link>
	<description>Free Tips, Tutorial and Templates for Microsoft Office</description>
	<lastBuildDate>Sat, 02 May 2009 09:35:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Removing Titles from Names and Counting the Number of Words in a Cell</title>
		<link>http://www.msofficetuneup.com/2008/11/18/removing-titles-from-names-and-counting-the-number-of-words-in-a-cell/</link>
		<comments>http://www.msofficetuneup.com/2008/11/18/removing-titles-from-names-and-counting-the-number-of-words-in-a-cell/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 07:07:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[titles]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=71</guid>
		<description><![CDATA[Removing Titles from  Names
You can use the formula that follows to remove four common  titles (Mr., Dr., Ms., and Mrs.) from a name. For example, if cell A1 contains  Mr. Fred Munster, the formula would return Fred Munster.
=IF(OR(LEFT(A1,2)={"Mr","Dr","Ms"}),RIGHT(A1,LEN(A1)-(FIND(".",A1)+1)),A1)
Counting the Number of  Words in a Cell
The following formula returns the number of [...]]]></description>
			<content:encoded><![CDATA[<h3 class="sect3-title">Removing Titles from  Names</h3>
<p class="first-para">You can use the formula that follows to remove four common  titles (Mr., Dr., Ms., and Mrs.) from a name. For example, if cell A1 contains  <em class="emphasis">Mr. Fred Munster,</em> the formula would return <em class="emphasis">Fred Munster.</em></p>
<pre class="programlisting">=IF(OR(LEFT(A1,2)={"Mr","Dr","Ms"}),RIGHT(A1,LEN(A1)-(FIND(".",A1)+1)),A1)</pre>
<h3 class="sect3-title">Counting the Number of  Words in a Cell</h3>
<p class="first-para">The following formula returns the number of words in cell  A1:</p>
<pre class="programlisting">=LEN(TRIM(A1))-LEN(SUBSTITUTE((A1)," ",""))+1</pre>
<p class="para">The formula uses the TRIM function to remove excess spaces. It  then uses the SUBSTITUTE function to create a new string (in memory) that has  all the space characters removed. The length of this string is subtracted from  the length of the original (trimmed) string to get the number of spaces. This  value is then incremented by 1 to get the number of words.</p>
<p class="para">Note that this formula will return 1 if the cell is empty. The  following modification solves that problem:</p>
<pre class="programlisting">=IF(LEN(A1)=0,0,LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/11/18/removing-titles-from-names-and-counting-the-number-of-words-in-a-cell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extracting First Names, Middle Names, and Last Names in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/11/16/extracting-first-names-middle-names-and-last-names-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/11/16/extracting-first-names-middle-names-and-last-names-in-excel-2007/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 07:03:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[First Names]]></category>
		<category><![CDATA[Last Names]]></category>
		<category><![CDATA[Middle Names]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=69</guid>
		<description><![CDATA[Suppose you have a list consisting of people&#8217;s names in a  single column. You have to separate these names into three columns: one for the  first name, one for the middle name or initial, and one for the last name. This  task is more complicated than you may initially think because not [...]]]></description>
			<content:encoded><![CDATA[<p class="first-para">Suppose you have a list consisting of people&#8217;s names in a  single column. You have to separate these names into three columns: one for the  first name, one for the middle name or initial, and one for the last name. This  task is more complicated than you may initially think because not every name in  the column has a middle name or middle initial. However, you can still do  it.</p>
<table class="note" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="admon-check" valign="top"></td>
<td class="admon-title" valign="top">Note</td>
<td class="admon-body" valign="top">
<p class="first-para">The task becomes a lot more complicated if the list contains  names with titles (such as Mrs. or Dr.) or names followed by additional details  (such as Jr. or III). In fact, the following formulas will not handle these  complex cases. However, they still give you a significant head start if you&#8217;re  willing to do a bit of manual editing to handle the special  cases.</p>
</td>
</tr>
</tbody>
</table>
<p class="para">The formulas that follow all assume that the name appears in cell  A1.</p>
<p class="para">You can easily construct a formula to return the first name:</p>
<pre class="programlisting">=IFERROR(LEFT(A1,FIND(" ",A1)-1),A1)</pre>
<p class="para">Returning the middle name or initial is much more complicated  because not all names have a middle initial. This formula returns the middle  name or initial (if it exists). Otherwise, it returns nothing.</p>
<pre class="programlisting">=IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))&gt;1,MID(A1,FIND("
",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-(FIND(" ",A1)+1)),"")</pre>
<p class="para">Finally, this formula returns the last name:</p>
<pre class="programlisting">=IFERROR(RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))))),"")</pre>
<p class="para"><span id="more-384"></span>The formula that follows is a much shorter way to extract the  middle name. This formula is useful if you use the other formulas to extract the  first name and the last name. It assumes that the first name is in B1 and the  last name is in D1.</p>
<pre class="programlisting">=IF(LEN(B1&amp;D1)+2&gt;=LEN(A1),"",MID(A1,LEN(B1)+2,LEN(A1)-LEN(B1&amp;D1)-2)</pre>
<table class="BlueLine" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="bluecell" bgcolor="#000080"><span style="font-size: x-small; font-family: Arial; color: #010100;"><strong><img title="Start Sidebar" src="http://www.msofficetuneup.com/images/excelformula/_.gif" border="0" alt="Image from book" width="1" height="2" /></strong></span></td>
</tr>
</tbody>
</table>
<p><span class="sidebar-title"><strong> Splitting Text Strings without Using Formulas</strong></span></p>
<p class="first-para">In many cases, you can  eliminate the use of formulas and use Excel&#8217;s Data <span class="inlinequation"><span class="inlinemediaobject"><img id="IMG_226" src="http://www.msofficetuneup.com/images/excelformula/figu136_1.jpg" border="0" alt="Image from book" width="16" height="13" /></span></span> Data Tools <span class="inlinequation"><span class="inlinemediaobject"><img id="IMG_227" src="http://www.msofficetuneup.com/images/excelformula/figu136_2.jpg" border="0" alt="Image from book" width="16" height="13" /></span></span> Convert Text to  Table command to parse strings into their component parts. Selecting this  command displays Excel&#8217;s Convert Text to Columns Wizard (see the accompanying  figure), which consists of a series of dialog boxes that walk you through the  steps to convert a single column of data into multiple columns. Generally,  you&#8217;ll want to select the Delimited option (in Step 1) and use Space as the  delimiter (in Step 2).</p>
<p><span class="figuremediaobject"><img id="IMG_228" title="Click To expand" src="http://www.msofficetuneup.com/images/excelformula/figu136_3.jpg" border="0" alt="Image from book" width="233" height="177" /></span></p>
<table class="BlueLine" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td class="bluecell" bgcolor="#000080"><span style="font-size: x-small; font-family: Arial; color: #010100;"><strong><img title="End Sidebar" src="http://www.msofficetuneup.com/images/excelformula/_.gif" border="0" alt="Image from book" width="1" height="2" /></strong></span></td>
</tr>
</tbody>
</table>
<table class="BlankSpace" border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td height="16"></td>
</tr>
</tbody>
</table>
<p class="para">As you can see in <span class="internaljump">Figure  5-6</span>, the formulas work fairly well. There are a few problems,  however-notably names that contain four &#8220;words.&#8221; But, as I mentioned earlier,  you can clean these cases up manually.</p>
<p><span class="figuremediaobject"><img id="IMG_229" title="Click To expand" src="http://www.msofficetuneup.com/images/excelformula/fig5-6.jpg" border="0" alt="Image from book" width="240" height="130" /></span> <br style="line-height: 1;" /><span class="figure-title"><span class="figure-titlelabel">Figure 5-6: </span>This worksheet uses formulas to  extract the first name, middle name (or initial), and last name from a list of  names in column A.</span></p>
<table class="note" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="admon-check" valign="top"></td>
<td class="admon-title" width="80" valign="top">Cross Ref</td>
<td class="admon-body" valign="top">
<p class="first-para">If you want to know how I  created these complex formulas, refer to <span class="chapterjump">Chapter 20</span> for a discussion of  megaformulas.</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/11/16/extracting-first-names-middle-names-and-last-names-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Extracting All but the First Word of a String in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/11/14/extracting-all-but-the-first-word-of-a-string-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/11/14/extracting-all-but-the-first-word-of-a-string-in-excel-2007/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 07:02:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[extract string]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=67</guid>
		<description><![CDATA[The following formula returns the contents of cell A1,  except for the first word:
=RIGHT(A1,LEN(A1)-FIND(" ",A1,1))
If cell A1 contains 2007 Operating Budget, the formula returns Operating Budget.
This formula returns an error if the cell contains only one word.  The formula below solves this problem and returns an empty string if the cell  does [...]]]></description>
			<content:encoded><![CDATA[<p class="first-para">The following formula returns the contents of cell A1,  except for the first word:</p>
<pre class="programlisting">=RIGHT(A1,LEN(A1)-FIND(" ",A1,1))</pre>
<p class="para">If cell A1 contains <em class="emphasis">2007 Operating Budget,</em> the formula returns <em class="emphasis">Operating Budget.</em></p>
<p class="para">This formula returns an error if the cell contains only one word.  The formula below solves this problem and returns an empty string if the cell  does not contain multiple words:</p>
<pre class="programlisting">=IFERROR(RIGHT(A1,LEN(A1)-FIND(" ",A1,1)),"")</pre>
<p class="para">For compatibility with earlier  versions of Excel, use this formula:</p>
<pre class="programlisting">=IF(ISERR(FIND(" ",A1)),"",RIGHT(A1,LEN(A1)-FIND(" ",A1,1)))</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/11/14/extracting-all-but-the-first-word-of-a-string-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracting the First Word and the Last Word of a String</title>
		<link>http://www.msofficetuneup.com/2008/11/12/extracting-the-first-word-and-the-last-word-of-a-string/</link>
		<comments>http://www.msofficetuneup.com/2008/11/12/extracting-the-first-word-and-the-last-word-of-a-string/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 06:59:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[extract string]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=65</guid>
		<description><![CDATA[Extracting the First  Word of a String
To extract the first word of a string, a formula must locate  the position of the first space character, and then use this information as an  argument for the LEFT function. The following formula does just that:
=LEFT(A1,FIND(" ",A1)-1)
This formula returns all of the text  prior [...]]]></description>
			<content:encoded><![CDATA[<h3 class="sect3-title">Extracting the First  Word of a String</h3>
<p class="first-para">To extract the first word of a string, a formula must locate  the position of the first space character, and then use this information as an  argument for the LEFT function. The following formula does just that:</p>
<pre class="programlisting">=LEFT(A1,FIND(" ",A1)-1)</pre>
<p class="para">This formula returns all of the text  prior to the first space in cell A1. However, the formula has a slight problem:  It returns an error if cell A1 consists of a single word. A simple modification  solves the problem by using an IFERROR function to check for the error:</p>
<pre class="programlisting">=IFERROR(LEFT(A1,FIND(" ",A1)-1),A1)</pre>
<p class="para">The IFERROR function is new to Excel 2007. For compatibility with  previous versions, use this formula:</p>
<pre class="programlisting">=IF(ISERR(FIND(" ",A1)),A1,LEFT(A1,FIND(" ",A1)-1)) <span id="more-381"></span></pre>
<h3 class="sect3-title">Extracting the Last  Word of a String</h3>
<p class="first-para">Extracting the last word of a string is more complicated  because the FIND function only works from left to right. Therefore, the problem  rests with locating the <em class="emphasis">last</em> space character. The formula  that follows, however, solves this problem. It returns the last word of a string  (all the text following the last space character):</p>
<pre class="programlisting">=RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-LEN(SUBSTITUTE(A1," ","")))))</pre>
<p class="para">This formula, however, has the same problem as the first formula  in the preceding section: It fails if the string does not contain at least one  space character. The following modified formula uses the IFERROR function to  avoid the error value.</p>
<pre class="programlisting">=IFERROR(RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1," ","*",LEN(A1)-
LEN(SUBSTITUTE(A1," ",""))))),A1)</pre>
<p class="para">For compatibility with previous Excel versions, use this  formula:</p>
<pre class="programlisting">=IF(ISERR(FIND(" ",A1)),A1,RIGHT(A1,LEN(A1)-FIND("*",SUBSTITUTE(A1,"
","*",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))))</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/11/12/extracting-the-first-word-and-the-last-word-of-a-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining a Column Letter for a Column Number in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/11/08/determining-a-column-letter-for-a-column-number-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/11/08/determining-a-column-letter-for-a-column-number-in-excel-2007/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 06:56:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[Column Letter]]></category>
		<category><![CDATA[Path Specification]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=62</guid>
		<description><![CDATA[Determining a Column  Letter for a Column Number
This next formula returns a worksheet column letter (ranging  from A to XFD) for the value contained in cell A1. For example, if A1 contains  29, the formula returns AC.
=LEFT(ADDRESS(1,A1,4),FIND(1,ADDRESS(1,A1,4))-1)
Note that the formula doesn&#8217;t check for a valid column number. In  other words, if [...]]]></description>
			<content:encoded><![CDATA[<h3 class="sect3-title">Determining a Column  Letter for a Column Number</h3>
<p class="first-para">This next formula returns a worksheet column letter (ranging  from A to XFD) for the value contained in cell A1. For example, if A1 contains  <em class="emphasis">29,</em> the formula returns <em class="emphasis">AC.</em></p>
<pre class="programlisting">=LEFT(ADDRESS(1,A1,4),FIND(1,ADDRESS(1,A1,4))-1)</pre>
<p class="para">Note that the formula doesn&#8217;t check for a valid column number. In  other words, if A1 contains a value less than 1 or greater than 16,384, the  formula will return an error. The following modification uses the new IFERROR  function to display text <em class="emphasis">(Invalid Column)</em> instead of an  error value.</p>
<pre class="programlisting">=IFERROR(LEFT(ADDRESS(1,A1,4),FIND(1,ADDRESS(1,A1,4))-1),"Invalid Column")</pre>
<p class="para">For compatibility with versions  prior to Excel 2007, use this formula: <span id="more-379"></span></p>
<pre class="programlisting">=IF(ISERR(LEFT(ADDRESS(1,A1,4),FIND(1,ADDRESS(1,A1,4))-1)),
"Invalid Column",LEFT(ADDRESS(1,A1,4),FIND(1,ADDRESS(1,A1,4))-1))</pre>
<h3 class="sect3-title">Extracting a Filename  from a Path Specification</h3>
<p class="first-para">The following formula returns the filename from a full path  specification. For example, if cell A1 contains <em class="emphasis">c:\windows\desktop\myfile.xlsx,</em> the formula returns <em class="emphasis">myfile.xlsx.</em></p>
<pre class="programlisting">=MID(A1,FIND("*",SUBSTITUTE(A1,"\","*",LEN(A1)-LEN(SUBSTITUTE(A1,"\",""))))+1,LEN(A1))</pre>
<p class="last-para">This formula assumes that the system path separator is a  backslash (\). It essentially returns all the text following the last backslash  character. If cell A1 doesn&#8217;t contain a backslash character, the formula returns  an error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/11/08/determining-a-column-letter-for-a-column-number-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Expressing a Number as an Ordinal in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/11/02/expressing-a-number-as-an-ordinal-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/11/02/expressing-a-number-as-an-ordinal-in-excel-2007/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 06:35:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[excel 2007]]></category>
		<category><![CDATA[formula excel]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[ordinal]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=60</guid>
		<description><![CDATA[You may need to express a  value as an ordinal number. For example, Today is the 21st day  of the month. In this case, the number 21 converts to an ordinal number by  appending the characters st to the number.
The characters appended to a number depend on the number. There is  [...]]]></description>
			<content:encoded><![CDATA[<p class="first-para">You may need to express a  value as an ordinal number. For example, <em class="emphasis">Today is the 21st day  of the month.</em> In this case, the number 21 converts to an ordinal number by  appending the characters <em class="emphasis">st</em> to the number.</p>
<p class="para">The characters appended to a number depend on the number. There is  no clear pattern, making the construction of a formula more difficult. Most  numbers will use the <em class="emphasis">th</em> suffix. Exceptions occur for  numbers that end with 1, 2, or 3-except if the preceding number is a 1 (numbers  that end with 11, 12, or 13). These may seem like fairly complex rules, but you  can translate them into an Excel formula.</p>
<p class="para">The formula that follows converts the number in cell A1 (assumed  to be an integer) to an ordinal number:</p>
<div class="widecontent">
<pre class="programlisting">=A1&amp;IF(OR(VALUE(RIGHT(A1,2))={11,12,13}),"th",IF(OR(VALUE(RIGHT(A1))={1,2,3}),
CHOOSE(RIGHT(A1),"st","nd","rd"),"th"))</pre>
</div>
<p class="para">This is a rather complicated formula, so it may help to examine  its components. Basically, the formula works as follows: <span id="more-377"></span></p>
<ol class="orderedlist">
<li class="first-listitem">
<p class="first-para">If the last two digits of the number are 11, 12, or 13, use  <em class="emphasis">th.</em></p>
</li>
<li class="listitem">
<p class="first-para">If Rule #1 does not apply, check the last digit. If the last  digit is 1, use <em class="emphasis">st.</em> If the last digit is 2, use <em class="emphasis">nd.</em> If the last digit is 3, use <em class="emphasis">rd.</em></p>
</li>
<li class="listitem">
<p class="first-para">If neither Rule #1 nor Rule #2 apply, use <em class="emphasis">th.</em></p>
</li>
</ol>
<table class="note" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="admon-check" valign="top"></td>
<td class="admon-title" width="80" valign="top">Cross Ref</td>
<td class="admon-body" valign="top">
<p class="first-para">The formula uses two arrays, specified by brackets. Refer to  <span class="chapterjump">Chapter 14</span> for  more information about using arrays in formulas.</p>
</td>
</tr>
</tbody>
</table>
<p class="para"><span class="internaljump">Figure 5-5</span> shows the formula  in use.</p>
<div class="figure"><a name="444"></a><a name="ch0"></a><span class="figuremediaobject"><span><img id="IMG_225" style="border: 0pt none;" title="Click To expand" src="http://www.msofficetuneup.com/images/fig5-5.jpg" border="0" alt="Image from book" width="262" height="334" /></span></span> <br style="line-height: 1;" /><span class="figure-title"><span class="figure-titlelabel">Figure 5-5: </span>Using a formula to express a number  as an ordinal.</span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/11/02/expressing-a-number-as-an-ordinal-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Counting Specific Characters in a Cell and the Occurrences of a Substring, excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/10/28/counting-specific-characters-in-a-cell-and-the-occurrences-of-a-substring-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/10/28/counting-specific-characters-in-a-cell-and-the-occurrences-of-a-substring-excel-2007/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 06:33:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[characters]]></category>
		<category><![CDATA[Substring]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=58</guid>
		<description><![CDATA[Counting Specific  Characters in a Cell
This formula counts the number of Bs (uppercase only) in the  string in cell A1:
=LEN(A1)-LEN(SUBSTITUTE(A1,"B",""))
This formula uses the SUBSTITUTE function to create a new string  (in memory) that has all the Bs removed. Then the length of this string is  subtracted from the length of the [...]]]></description>
			<content:encoded><![CDATA[<h3 class="sect3-title">Counting Specific  Characters in a Cell</h3>
<p class="first-para">This formula counts the number of Bs (uppercase only) in the  string in cell A1:</p>
<pre class="programlisting">=LEN(A1)-LEN(SUBSTITUTE(A1,"B",""))</pre>
<p class="para">This formula uses the SUBSTITUTE function to create a new string  (in memory) that has all the Bs removed. Then the length of this string is  subtracted from the length of the original string. The result reveals the number  of Bs in the original string.</p>
<p class="para">The following formula is a bit more versatile. It counts the  number of Bs (both upperand lowercase) in the string in cell A1.</p>
<pre class="programlisting">=LEN(A1)-LEN(SUBSTITUTE(SUBSTITUTE(A1,"B",""),"b",""))<span id="more-375"></span></pre>
<h3 class="sect3-title">Counting the  Occurrences of a Substring in a Cell</h3>
<p class="first-para">The formulas in the preceding section count the number of  occurrences of a particular character in a string. The following formula works  with more than one character. It returns the number of occurrences of a  particular substring (contained in cell B1) within a string (contained in cell  A1). The substring can consist of any number of characters.</p>
<pre class="programlisting">=(LEN(A1)-LEN(SUBSTITUTE(A1,B1,"")))/LEN(B1)</pre>
<p class="para">For example, if cell A1 contains the text <em class="emphasis">Blonde  On Blonde</em> and B1 contains the text <em class="emphasis">Blonde,</em> the formula  returns 2.</p>
<p class="para">The comparison is case sensitive, so if B1 contains the text <em class="emphasis">blonde,</em> the formula returns 0. The following formula is a  modified version that performs a case-insensitive comparison:</p>
<pre class="programlisting">=(LEN(A1)-LEN(SUBSTITUTE(UPPER(A1),UPPER(B1),"")))/LEN(B1)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/10/28/counting-specific-characters-in-a-cell-and-the-occurrences-of-a-substring-excel-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching and Replacing within a String in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/10/23/searching-and-replacing-within-a-string-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/10/23/searching-and-replacing-within-a-string-in-excel-2007/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 06:32:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[replace string]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=56</guid>
		<description><![CDATA[You can use the REPLACE function in conjunction with the  SEARCH function to replace part of a text string with another string. In effect,  you use the SEARCH function to find the starting location used by the REPLACE  function.
For example, assume cell A1 contains the text Annual Profit Figures. The following formula [...]]]></description>
			<content:encoded><![CDATA[<p class="first-para">You can use the REPLACE function in conjunction with the  SEARCH function to replace part of a text string with another string. In effect,  you use the SEARCH function to find the starting location used by the REPLACE  function.</p>
<p class="para">For example, assume cell A1 contains the text <em class="emphasis">Annual Profit Figures.</em> The following formula searches for the  word <em class="emphasis">Profit</em> and replaces those six characters it with the  word <em class="emphasis">Loss:</em></p>
<pre class="programlisting">=REPLACE(A1,SEARCH("Profit",A1),6,"Loss")</pre>
<p class="para">This next formula uses the SUBSTITUTE function to accomplish the  same effect in a more efficient manner:</p>
<pre class="programlisting">=SUBSTITUTE(A1,"Profit","Loss")</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/10/23/searching-and-replacing-within-a-string-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding and Searching within a String in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/10/17/finding-and-searching-within-a-string-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/10/17/finding-and-searching-within-a-string-in-excel-2007/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 05:51:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[search string]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=54</guid>
		<description><![CDATA[The Excel FIND and SEARCH functions enable you to locate the  starting position of a particular substring within a string:


FIND: Finds a substring within another  text string and returns the starting position of the substring. You can specify  the character position at which to begin searching. Use this function for  case-sensitive [...]]]></description>
			<content:encoded><![CDATA[<p class="first-para">The Excel FIND and SEARCH functions enable you to locate the  starting position of a particular substring within a string:</p>
<ul class="itemizedlist">
<li class="first-listitem">
<p class="first-para"><strong class="bold">FIND:</strong> Finds a substring within another  text string and returns the starting position of the substring. You can specify  the character position at which to begin searching. Use this function for  case-sensitive text comparisons. Wildcard comparisons are not supported.</p>
</li>
<li class="listitem">
<p class="first-para"><strong class="bold">SEARCH:</strong> Finds a substring within another  text string and returns the starting position of the substring. You can specify  the character position at which to begin searching. Use this function for  nonâ€“case-sensitive text or when you need to use wildcard  characters.</p>
</li>
</ul>
<p class="para"><a name="436"></a><a name="p"></a>The following formula uses the FIND  function and returns 7, the position of the first <em class="emphasis">m</em> in the  string. Notice that this formula is case sensitive.</p>
<pre class="programlisting">=FIND("m","Big Mamma Thornton",1)</pre>
<p class="para"><span id="more-371"></span>The formula that follows, which uses the SEARCH function, returns  <em class="emphasis">5</em>, the position of the first m (either uppercase or  lowercase):</p>
<pre class="programlisting">=SEARCH("m","Big Mamma Thornton",1)</pre>
<p class="para">You can use the following wildcard characters within the first  argument for the SEARCH function:</p>
<ul class="itemizedlist">
<li class="first-listitem">
<p class="first-para"><strong class="bold">Question mark (?):</strong> Matches any single  character</p>
</li>
<li class="listitem">
<p class="first-para"><strong class="bold">Asterisk (*):</strong> Matches any sequence of  characters</p>
</li>
</ul>
<table class="tip" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="admon-check" valign="top"></td>
<td class="admon-title" valign="top">Tip</td>
<td class="admon-body" valign="top">
<p class="first-para">If you want to find an actual question mark or asterisk  character, type a tilde (~) before the question mark or  asterisk.</p>
</td>
</tr>
</tbody>
</table>
<p class="para">The next formula examines the text in cell A1 and returns the  position of the first three- character sequence that has a hyphen in the middle  of it. In other words, it looks for any character followed by a hyphen and any  other character. If cell A1 contains the text <em class="emphasis">Part- A90,</em> the formula returns 4.</p>
<pre class="programlisting">=SEARCH("?-?",A1,1)</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/10/17/finding-and-searching-within-a-string-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing Text with Other Text in Excel 2007</title>
		<link>http://www.msofficetuneup.com/2008/10/12/replacing-text-with-other-text-in-excel-2007/</link>
		<comments>http://www.msofficetuneup.com/2008/10/12/replacing-text-with-other-text-in-excel-2007/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 03:52:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Excel Formula]]></category>
		<category><![CDATA[excel 2007]]></category>
		<category><![CDATA[replace text]]></category>

		<guid isPermaLink="false">http://localhost/radd/office26/?p=52</guid>
		<description><![CDATA[In some situations, you may need to replace a part of a text  string with some other text. For example, you may import data that contains  asterisks, and you need to convert the asterisks to some other character. You  could use Excel&#8217;s Find and Replace dialog box to make the replacement. If [...]]]></description>
			<content:encoded><![CDATA[<p class="first-para">In some situations, you may need to replace a part of a text  string with some other text. For example, you may import data that contains  asterisks, and you need to convert the asterisks to some other character. You  could use Excel&#8217;s Find and Replace dialog box to make the replacement. If you  prefer a formula-based solution, you can take advantage of either of two  functions:</p>
<ul class="itemizedlist">
<li class="first-listitem">
<p class="first-para"><strong class="bold">SUBSTITUTE:</strong> Replaces specific text in a string. Use this function when you know the  character(s) to be replaced, but not the position.</p>
</li>
<li class="listitem">
<p class="first-para"><strong class="bold">REPLACE:</strong> Replaces text that occurs in a  specific location within a string. Use this function when you know the position  of the text to be replaced, but not the actual text.</p>
</li>
</ul>
<p class="para">The following formula uses the SUBSTITUTE function to replace <em class="emphasis">2006</em> with <em class="emphasis">2007</em> in the string <em class="emphasis">2006 Budget.</em> The formula returns <em class="emphasis">2007  Budget.</em></p>
<pre class="programlisting">=SUBSTITUTE("2006 Budget","2006","2007")</pre>
<p class="para"><span id="more-369"></span>The following formula uses the SUBSTITUTE function to remove all  spaces from a string. In other words, it replaces all space characters with an  empty string. The formula returns the title of an excellent Liz Phair CD: <em class="emphasis">Whitechocolatespaceegg.</em></p>
<pre class="programlisting">=SUBSTITUTE("White chocolate space egg"," ","")</pre>
<p class="para">The following formula uses the REPLACE function to replace one  character beginning at position 5 with nothing. In other words, it removes the  fifth character (a hyphen) and returns <em class="emphasis">Part544.</em></p>
<pre class="programlisting">=REPLACE("Part-544",5,1,"")</pre>
<p class="para">You can, of course, nest these functions to perform multiple  replacements in a single formula. The formula that follows demonstrates the  power of nested SUBSTITUTE functions. The formula essentially strips out any of  the following seven characters in cell A1: space, hyphen, colon, asterisk,  underscore, left parenthesis, and right parenthesis.</p>
<pre class="programlisting">=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(
A1," ",""),"-",""),":",""),"*",""),"_",""),"(",""),")","")</pre>
<p class="last-para">Therefore, if cell A1 contains the string <em class="emphasis">Part-2A &#8211; Z(4M1)_A*,</em> the formula returns <em class="emphasis">Part2AZ4M1A.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.msofficetuneup.com/2008/10/12/replacing-text-with-other-text-in-excel-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
