Skip to content

How To Blog

  • How to Create and Run Macros in MS Word the Easy Way Office Tips
  • Forge Of Empires Is Probably The Most Addictive iPad Game Ever iPad
  • How to Automatically Update Free Software with Chocolatey Software Reviews
  • How to Customize Google Homepage With Your Name and Picture How-To
  • Top 9 Samsung Gear S3 Apps To Improve Your Health Gadgets
  • How to Schedule Downloads on Chrome Android How-To
  • Outlook Data File Cannot Be Accessed: 4 Fixes To Try Office Tips
  • Hide/Unhide Extension Icons From Chrome Toolbar How-To

How to Separate First and Last Names in Excel

Posted on October 6, 2020 By blog_786 No Comments on How to Separate First and Last Names in Excel

If you use Excel a lot, you’ve probably come across a situation where you have a name in one cell and need to split the name into different cells. This is a very common problem in Excel, and you can probably do a Google search and download 100 different macros written by different people to do it for you.

However, in this post, I’ll show you how to set up a formula so you can do it yourself and really understand what’s going on. If you use Excel a lot, it’s probably a good idea to learn some of the more advanced functions so you can do more interesting things with your data.

If you don’t like formulas and want a faster solution, scroll down to the Text to Columns section, which explains how to use the Excel function to do the same. In addition, the function to convert text to columns is also best used if there are more than two elements in a cell that need to be split. For example, if 6 fields are combined in one column, using the formulas below will get really messy and difficult.

Separate names in Excel

First, let’s take a look at how names are commonly stored in an Excel spreadsheet. The most common two ways I’ve seen are first name, last name with a space and last name, first name with a comma separating them. Whenever I saw the initials in the middle, it was usually the intermediate last name of the first name, as shown below:

By using a few simple formulas and combining several of them, you can easily separate the first, last and middle initials into separate cells in Excel. Let’s start by extracting the first part of the name. In my case, we will be using two functions: left and search. Logically, we need to do the following:

Find a space in the text or a comma, find a position and remove all letters to the left of that position.

Here is a simple formula to get the job done right: = LEFT (NN, SEARCH (“”, NN) – 1), where NN is the cell that stores the name. -1 is used to remove extra space or comma at the end of a line.

As you can see, we start with a left-hand function that takes two arguments: a string and the number of characters you want to capture, starting from the beginning of the string. In the first case, we search for a space by using double quotes and placing a space between them. In the second case, we are looking for a comma instead of a space. So what is the result for the three scenarios I mentioned?

We got the first name from line 3, the last name from line 5, and the first name from line 7. Great! So, depending on how your data is stored, now you have extracted either the first name or the last name. Now for the next part. Logically, this is what we need to do now:

– Look for a space or comma in the text, find the position, and then subtract it from the total length of the string. This is what the formula will look like:

= RIGHT (NN; LEN (NN) -SEARCH (”“, NN))

So now we are using the correct function. This also takes two arguments: the string and the number of characters you want to capture, starting at the end of the line going to the left. So, we need the length of the string minus the space or comma position. This will give us everything to the right of the first space or comma.

Great, now we have the second part of the name! In the first two cases, you are almost done, but if there is a middle initial in the first name, you can see that the result still includes the last name with a second initial. So how do we just get the last name and get rid of the initial in the middle? Easy! Just run the same formula again that we used to get the second part of the name.

So we just do one more thing correct and this time apply the formula to the combined cell of the middle initial and last name. It will find a space after the middle initial and then take the length minus the space position, the number of characters from the end of the string.

That’s all! Now you have split the first and last name into separate columns using a few simple formulas in Excel! Obviously, not everyone will have this text format, but you can easily edit it to suit your needs.

Text to Columns

There is also another easy way to split merged text into separate columns in Excel. It’s a feature called Text to Columns and it works really well. It is also much more efficient if you have a column that contains more than two pieces of data.

For example, below I have some data where one row contains 4 pieces of data and the other row contains 5 pieces of data. I would like to split this into 4 columns and 5 columns respectively. As you can see, trying to use the above formulas is impractical.

How to Separate First and Last Names in Excel

In Excel, first select the column you want to split. Then go to the Data tab and click Text to Columns.

How to Separate First and Last Names in Excel

This will bring up the Text to Columns wizard. In step 1, you choose whether the box is delimited or fixed width. In our case, we will choose with delimiters.

How to Separate First and Last Names in Excel

On the next screen, you will select a separator. You can select tab, semicolon, comma, space, or enter an arbitrary value.

How to Separate First and Last Names in Excel

Finally, you choose the data format for the column. Generally, General is fine for most data types. If you have something specific like dates, choose this format.

How to Separate First and Last Names in Excel

Click “Finish” and see how your data is magically divided into columns. As you can see, one row has become five columns, and the other has become four columns. The function of converting text to columns is very powerful and can make your life much easier.

How to Separate First and Last Names in Excel

If you have problems with name separation not in the above format, please leave a comment with your details and I will try to help. Enjoy!

–

MS Office Tips

Post navigation

Previous Post: Fix Black or Blank Screen and Flash Videos Not Playing
Next Post: Google Pixel 2 Camera Tutorial and Tips

Related Posts

  • Link Cells Between Sheets and Workbooks In Excel MS Office Tips
  • How to Share or Collaborate On a Word Doc with Others MS Office Tips
  • How To Get Microsoft Word For Free MS Office Tips
  • How to Add and Print Excel Background Images MS Office Tips
  • How to Compare Two Excel Files MS Office Tips
  • How to Completely Delete Personal Metadata from Microsoft Office Documents MS Office Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress

Recent Posts

  • What if iMessage is not working on iPhone? Here are 12 ways to fix it
  • Logitech Unifying Receiver Not Working? 11 Fixes to Try
  • What to Do When a Friend’s Facebook Account is Hacked or Duped
  • 10 best clock widgets not to be lost on your iPhone home screen
  • Can I change the file type in Windows 10?

Recent Comments

  1. Can I change the file type in Windows 10? - How To Blog on The 7 Best PDF Readers for Windows In 2020
  2. How to create line graphs in Google Sheets - How To Blog on How To Format Spreadsheet Cells To Automatically Calculate Amounts
  3. Best Ways to Create Your Own 3d Printed Lithophanes? - How To Blog on 10 Best 3D Printers for Beginners Under $500
  4. Top 5 3D Modeling Apps for iPad Pro - How To Blog on How To Use Apple Sidecar
  5. The 5 Best Original Netflix Animations You Can Stream Now - How To Blog on check netflix video quality internet explorer
  • What Does SMH Mean (And How to Use It) technology
  • Fix “Windows Can’t Connect To This Network” Error Networking
  • The 8 Best Online Sources For Green Screen Special Effects Reviews
  • Windows Asks to Format Your USB Drive or SD Card When Connected? Computer Tips
  • How to Watch Winter Olympics 2018 from Anywhere How-To
  • A Notion App Review: 15 Tips for Beginners Reviews
  • Install and Setup a Website in IIS on Windows 10 Windows 10
  • How to Connect Roku to Wi-Fi Computer Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version