A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Hi Steve,
Did you check above replies? If you still need further support, please do not hesitate to reply to me.
Best regards,
Jazlyn
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello, How do I separate out a couples first names easily? Here is my example the first name column is Joe & Susan I want it to have Joe in a column and Susan in a column.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Hi Steve,
Did you check above replies? If you still need further support, please do not hesitate to reply to me.
Best regards,
Jazlyn
Answer accepted by question author
You already have a bunch of good suggestions.
.
Are you going to be getting more data later?
Where does your new data come from. Could you pull it from some other computer source or do you have to type it manually?
.
If you can pull new data in from another computer or file then you may want to take advantage of the automation built in to PowerQuery.
PowerQuery allows you to pull data in from MANY sources. Then you can manipulate the data in very many ways. In this case you will be splitting the 2 first names.
What about "blended" families with 2 moms and a dad , or visa versa?
After you set up the query you can use the refresh function to pull in new data.
.
If you are interested I can give you some links to get started.
Answer accepted by question author
@Steve Lilgreen,
Note that I edited my previous post. The formula goes in cell B2, not A2 as I initially had in both the text and screen shot (but the formula references cell A2.)
My apologies for the error and this post to ensure you get an email notification because notifications not sent for edits.
Answer accepted by question author
If you are using Excel in Office 365 then the following UDF (User Defined Function) is also a solution. (Does not work in earlier versions of Excel. Not sure about Excel 2019 and 2021)
Not sure of your expertise here so I will include full guidelines to install the code.
Ensure macros are enabled as follows.
Copy the code below from Function Separate to End Sub and paste into the VBA editor***.***
Function Separate(rng As Range) As Variant '(Variant so it can be an array)
Dim strToSplit As String
Dim arrSplit As Variant
strToSplit = Replace(rng.Value, " ", "") 'Remove all spaces from string and save result in strToSplit
Separate = Split(strToSplit, "&") 'Assign strings separated by "&" to a zero based array
End Function
ScreenShot with more guidelines on using the UDF in the worksheet. Note the formula that goes in cell B2 and copied down.