Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • The Best Smart Plugs in 2019 that Work with Alexa and Google Home Smart Home
  • How to Download YouTube Videos to iPhone How-To
  • Turn Your Phone into a Home Control Dashboard or Remote How-To
  • Create Custom Keyboard Shortcuts for Anything in Windows 10 How-To
  • 5 Things You Should Do Before Selling Your Old iPhone iPhone
  • Chrome Password Manager: How To Use It And Is It All You Need? Google Software/Tips
  • How to Play 3GP 3G2 Files in Windows Media Player How-To
  • 8 Best Wi-Fi Speed Test Apps for iPhone 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!

–

Share this:

  • Twitter
  • Facebook
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

  • Microsoft Word Not Responding? 8 Ways To Fix It MS Office Tips
  • How To Sync Outlook Contacts With Android, iPhone, Gmail & More iPhone
  • Where to Download Cool Microsoft Teams Background Images for Free MS Office Tips
  • How to Sync a Notebook in OneNote for Windows MS Office Tips
  • Search Outlook Email by Sender, Date, Keyword, Size and More MS Office Tips
  • Create Dropdown Lists in Excel using Data Validation MS Office Tips

Leave a Reply Cancel reply

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

Archives

  • September 2023
  • August 2023
  • July 2023
  • 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
  • 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

  • AI Tools & Guides
  • 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
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • 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
  • How to reset your SIM card
  • This Simple Trick Lets You Play YouTube in the Background on iOS
  • How to go Back to the old YouTube Layout (2013)
  • How to Bypass Chromecast DNS and Circumvent Geo Blocking
  • 5 Cool Websites to Find Good Movies and TV Shows on Netflix
DMCA.com Protection Status

Recent Posts

  • MailTag: Real-time Email Tracking, Made Easy
  • Pokemon Sleep: what is it and how to play
  • How to Respond to Messages on Instagram (Mobile and PC)
  • How to reset your SIM card
  • This Simple Trick Lets You Play YouTube in the Background on iOS

Recent Comments

  1. This Simple Trick Lets You Play YouTube in the Background on iOS on YouTube Not Working? Here Are Quick Fixes To Try
  2. How to Bypass Chromecast DNS and Circumvent Geo Blocking on 5 Cool Websites to Find Good Movies and TV Shows on Netflix
  3. 5 Cool Websites to Find Good Movies and TV Shows on Netflix on check netflix video quality internet explorer
  4. SmartDNS vs VPN “What’s the Difference?” on How to Watch Apple TV on Roku
  5. How to go Back to the old YouTube Layout (2013) on 10 Things to Check Before Publishing a YouTube Video
  • Best Smart Home Devices to Decorate For the Holidays Smart Home
  • 6 Best Alexa Skills That Help When You’re Sick Smart Home
  • Best clipboard calculator 2020

    Best clipboard calculator 2020. 1 - Pink Nursing Clipboard Pink (Aluminum Clipboard Nursing Edition) Folding Clipboard for Nurses, Doctors, Medical

  • Tab Key Not Working in Windows 7 Help Desk
  • How to Disable Adobe Flash in Microsoft Edge on Windows 10 Windows 10
  • 4 Best Word to PDF Converter For Mac How-To
  • How to Prevent Shutdown of a Windows Computer Computer Tips
  • Find the MAC address of your Android device How-To

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version