{"id":145,"date":"2007-12-21T07:13:16","date_gmt":"2007-12-21T11:13:16","guid":{"rendered":"http:\/\/alsplace.aldenbaker.com\/alsplace\/microsoft\/ms-office\/ms-excel\/145\/joining-two-text-columns-changing-case-to-proper\/"},"modified":"2007-12-21T07:17:49","modified_gmt":"2007-12-21T11:17:49","slug":"joining-two-text-columns-changing-case-to-proper","status":"publish","type":"post","link":"https:\/\/alsplace.info\/?p=145","title":{"rendered":"Joining Two Text Columns &#8211; Changing case to &#8220;PROPER&#8221;"},"content":{"rendered":"\n<!-- ALL ADSENSE ADS DISABLED -->\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n<td width=\"100%\">\n<p align=\"justify\">I teach a class on Power Excel at the University of Akron. Although it is advertised as an advanced class, there are always some basic concepts that the students don&#39;t seem to know. I am amazed at how the simplest techniques will cause the most excitement. This is one of those tips.<\/p>\n<p align=\"justify\">Today, Sajjad from Dubai wrote with a question. He has a database with first name in Column A and Last name in column B. How can he merge First Name and Last Name into a single column?<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091100.jpg\" border=\"0\" width=\"177\" height=\"225\" \/><\/p>\n<p align=\"justify\">This is one of those questions that you can never find in Excel help, because no one thinks to search for the word &quot;Concatenation&quot;. Heck, I don&#39;t think any normal person ever uses the word concatenate. If you don&#39;t know to search for Concatenate, then you will never learn that the concatenation operator is an ampersand. Start with a basic formula of<br \/> &nbsp;&nbsp;=A2&amp;B2 This will give you the result shown in C2 below:<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091101.jpg\" border=\"0\" width=\"292\" height=\"109\" \/><\/p>\n<p align=\"justify\">This is a good start. However, we really should concatenate first name, a space, and last name. Try this formula:<\/p>\n<p align=\"justify\">&nbsp;&nbsp;=A2&amp;&quot; &quot;&amp;B2<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091102.jpg\" border=\"0\" width=\"301\" height=\"76\" \/><\/p>\n<p align=\"justify\">Then, the question is: do you want to scream MICKEY MANTLE, or would you rather say Mickey Mantle? If you want to change the name to proper case, use the =PROPER() function.<br \/> &nbsp;&nbsp;=PROPER(A2&amp;&quot; &quot;&amp;B2) [<font color=\"#cc0000\">Note: see my comment to this message.]<\/font><\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091103.jpg\" border=\"0\" width=\"337\" height=\"80\" \/><\/p>\n<p align=\"justify\">Next, you want to copy the formula down to all of the cells in the column. A shortcut method for doing this is to double-click the fill handle while cell C2 is selected. The fill handle is the darker square dot in the lower right corner of the cell pointer. The dot looks like this:<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091104.jpg\" border=\"0\" width=\"27\" height=\"20\" \/> When your mouse pointer is near the dot, the mouse pointer changes to a cross like this.<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091105.jpg\" border=\"0\" width=\"124\" height=\"50\" \/><\/p>\n<p align=\"justify\">Double click and the formula will be copied down to all of the cells in the range.<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091106.jpg\" border=\"0\" width=\"310\" height=\"245\" \/><\/p>\n<p align=\"justify\">Note: Excel uses the column to the left when figuring out how far to copy cells after the double click. If you happened to have a blank cell in B8, this trick would stop at row 7. Leave <a href=\"http:\/\/www.coastalrock.com\/\">cialis tadalafil 5mg<\/a>  it to Cher to cause a problem.<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091107.jpg\" border=\"0\" width=\"288\" height=\"224\" \/><\/p>\n<p align=\"justify\">If this is the case, you might want to grab the fill handle and drag down to all of the rows in order to copy the formula. Note 2: The Proper function is excellent, but it does not properly capitalize last names like McCartney (See cell C7). You will have to manually go through and capitalize the C after the Mc. It would also have a problem with VanHalen. Is this a pain? Yes &#8211; but it is easier to fix a few cells than to retype everything in proper case.<\/p>\n<p align=\"justify\"><strong>Converting Formulas to Values<\/strong> Now that you have Firstname Lastname in column C, you might be tempted to delete columns A &amp; B. You can&#39;t do this yet. If you would delete columns A &amp; B, all of the formulas in column C would change to the #REF! error. This error is saying, &quot;Hey &#8211; you told me the value in this column should be from A2 &amp; B2, but you deleted those cells so I don&#39;t know what to put here!&quot;.<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091108.jpg\" border=\"0\" width=\"137\" height=\"224\" \/><\/p>\n<p align=\"justify\">The solution is to change the formulas to values before you delete columns A &amp; B. Follow these steps:<\/p>\n<ul>\n<li>\n<div align=\"justify\">Highlight the range of cells in column C<\/div>\n<\/li>\n<li>\n<div align=\"justify\">Copy those cells to the clipboard using your favorite method (The 4 methods to choose from: Ctrl+c, or Edit &#8211; Copy from the menu, or the clipboard icon on the toolbar, or right-click and choose copy).<\/div>\n<\/li>\n<li>\n<div align=\"justify\">Without unselecting the cells, from the menu, choose Edit &gt; Paste Special. From the Paste Special dialog box, choose Values and then OK. This step will paste the current value of each cell in the range back into the cell. Rather than having a formula, you will now have a static value. It is safe to delete columns A &amp; B.<\/div>\n<\/li>\n<\/ul>\n<p align=\"justify\"><strong>Joining a cell containing text to a cell containing a number<\/strong> In general, this will work out fairly well. In the image below, I&#39;ve used the formula to build a phrase containing a name in column A with an age in column C.<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091109.jpg\" border=\"0\" width=\"426\" height=\"121\" \/><\/p>\n<p align=\"justify\">The trick is when the number is displayed in one format and you want it to be used in another format. Dates are a classic example of this. The date of December 11 1943 is actually stored as a number of days since January 1 1900. If I try to join the text in column A with the date in column B, I get a silly looking result<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091110.jpg\" border=\"0\" width=\"451\" height=\"125\" \/><\/p>\n<p align=\"justify\">The solution is to use the =TEXT() function. The text function requires two arguments. The first argument is a cell containing a number. The second argument is a custom number format that indicates how the number is to be displayed. The following formula will produce a nicely formatted result.<\/p>\n<p align=\"justify\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.mrexcel.com\/mec04091111.jpg\" border=\"0\" width=\"500\" height=\"118\" \/><\/p>\n<p align=\"justify\">There are a lot of cool techniques that were covered in this tip.<\/p>\n<ul>\n<li>\n<div align=\"justify\">A formula to join 2 columns of text using the ampersand as a concatenation operator<\/div>\n<\/li>\n<li>\n<div align=\"justify\">How to join a cell to a text value<\/div>\n<\/li>\n<li>\n<div align=\"justify\">How to use the PROPER function to change names to proper case<\/div>\n<\/li>\n<li>\n<div align=\"justify\">Why you get a #REF! error<\/div>\n<\/li>\n<li>\n<div align=\"justify\">How to use Paste Special Values to convert formulas to values.<\/div>\n<\/li>\n<li>\n<div align=\"justify\">Joining a cell containing text to a cell containing a number<\/div>\n<\/li>\n<li>\n<div align=\"justify\">Using the TEXT function to control the display of a date in a formula.<\/div>\n<\/li>\n<\/ul>\n<p align=\"justify\">This tip was originally published on September 12, 2004. The permanent URL for this page is <a href=\"http:\/\/www.mrexcel.com\/tip074.shtml\"><strong>http:\/\/www.mrexcel.com\/tip074.shtml<\/strong><\/a>.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<!-- Social Bookmarks BEGIN -->\n<div class=\"social_bookmark\">\n<a title=\"Click me to see the sites.\" href=\"#\" onclick=\"$$('div.d145').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;\"><strong><em>Bookmark to:<\/em><\/strong><\/a>\n<br \/>\n<div class=\"d145\" style=\"overflow:hidden\">\n<br \/>\n<br \/>\n<a style=\"font-size:90%;text-align: right; \" title=\"Click me to hide the sites.\" href=\"#\" onclick=\"$$('div.d145').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;\">Hide Sites<\/a>\n<\/div>\n<\/div>\n<!-- Social Bookmarks END -->\n<script type=\"text\/javascript\">$$('div.d145').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); <\/script>","protected":false},"excerpt":{"rendered":"<p>I teach a class on Power Excel at the University of Akron. Although it is advertised as an advanced class, there are always some basic concepts that the students don&#39;t seem to know. I am amazed at how the simplest techniques will cause the most excitement. This is one of those tips. Today, Sajjad from [&hellip;]<\/p>\n<!-- Social Bookmarks BEGIN -->\n<div class=\"social_bookmark\">\n<a title=\"Click me to see the sites.\" href=\"#\" onclick=\"$$('div.d145').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;\"><strong><em>Bookmark to:<\/em><\/strong><\/a>\n<br \/>\n<div class=\"d145\" style=\"overflow:hidden\">\n<br \/>\n<br \/>\n<a style=\"font-size:90%;text-align: right; \" title=\"Click me to hide the sites.\" href=\"#\" onclick=\"$$('div.d145').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;\">Hide Sites<\/a>\n<\/div>\n<\/div>\n<!-- Social Bookmarks END -->\n<script type=\"text\/javascript\">$$('div.d145').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); <\/script>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[32],"tags":[],"_links":{"self":[{"href":"https:\/\/alsplace.info\/index.php?rest_route=\/wp\/v2\/posts\/145"}],"collection":[{"href":"https:\/\/alsplace.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alsplace.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alsplace.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alsplace.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=145"}],"version-history":[{"count":0,"href":"https:\/\/alsplace.info\/index.php?rest_route=\/wp\/v2\/posts\/145\/revisions"}],"wp:attachment":[{"href":"https:\/\/alsplace.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alsplace.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alsplace.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}