In this post, I’ll show you how to set up a formula so you can do it yourself and actually understand what is going on. If you use Excel a lot, it’s probably a good idea to learn some of the more advanced functions so that you can do more interesting things with your data.
If you want a quick and easy solution, scroll down to the Text to Columns section, which will teach you how to use an Excel feature to do the same thing. Additionally, the text to columns feature is also better if you have more than two items in a cell. For example, if one column has 6 fields combined together, then using the formulas below will become really messy and complicated.
Separate Names in Excel
John, Smith Mary, Jones If you have a lot of people with the same last name, you can use a list like this: John, Smith Mary, Jones John, Smith Jr. Mary, Jones Jr. ..
- Open Excel and create a new worksheet.
- Enter the first name in cell A1, the last name in cell A2, and the middle initial in cell A3.
- To get the first part of the name, we’ll use left. In cell B1, type left(A1, 1). This will return the letter “L” in cell B1.
- To get the last part of the name, we’ll use search. In cell B2, type search(A2). This will return any number between 1 and 9 that is not equal to “L” (in other words, it will return any number between “A2” and “D9”). So our final result would be in cell B3: left(B1, search(B2)). ..
Search the text in the cell for a space or comma, find the position and then take out all the letters to the left of that position and insert a space.
To find the name in a cell, use the formula =LEFT(NN, SEARCH(” “, NN) – 1). The -1 is there to remove the extra space or comma at the end of the string. ..
In the first case, the result is the same as if we used double quotes: “3”. In the second case, the result is different because we are looking for a comma instead of a space. So in this case, the result is “2”. In the third case, we have not found a space so our result is “1”.
We need to find the person in row 3 who has the same last name as the person in row 5. We can do this by looking at their first name and seeing if it matches. If it does, then we know that the person in row 3 is the one we’re looking for. If not, then we move on to the next row and try again. ..
subtract(position, totalLength) -In this example, the string is “I’m not a fan of cats.” The position would be at the end of the string and the subtraction would be 3. So the final string would be “I’m not a fan of, cats.” ..
The code to grab a substring from a string is as follows: substring(string, position, length) This function takes two arguments: the string and the position of where you want to start grabbing text from. The first argument is the length of the text you want to grab, minus the position of where the space or comma is. The second argument is how many characters you want to grab starting from that point going left. ..
We can get rid of the middle initial by running the same formula that we used to get the second section of the name.
We are just doing another right and this time applying the formula on the combined middle initial and last name cell. It will find the space after the middle initial and then take the length minus the position of the space number of characters off the end of the string.
Now that you have split the first and last name into separate columns, it’s time to start thinking about how to use this information in your writing. Obviously, you will want to use the first and last name in different ways in different contexts, but there are a few things you can do to help with this. For example, if you are writing about someone who has two first names, you might want to use one of them as the main name and use the other as a last name. This will make it easier for readers to remember who the person is and where they came from. Similarly, if you are writing about someone with only one first name, you might want to use that as the main name and write out all of their other aliases or nicknames. This will make it easier for readers to follow along with your story.
Text to Columns
To separate combined text into separate columns in Excel, use the Text to Columns feature. This feature is very efficient and can help you save space on your spreadsheet.
For data where there are 4 pieces of data and 5 pieces of data, I would like to split that into 4 columns and 5 columns.
In Excel, select the column you want to separate and then click on the Data tab. Then, click on Text to Columns.
In step 2, you choose the column width. In our case, we’ll choose 3.5 inches.
You can choose from tab, semicolon, comma, space or type a custom delimiter on the next screen.
You can choose between General and Date formats when you create your column. ..
Your data is now neatly separated into columns, making it easier to understand and manage. The Text to Columns feature is very powerful, making your life a lot easier.
If you are having trouble distinguishing between names that are not in the standard format, please post a comment with your data and I will try to help. ..