I have a list of names but the First and Last names are only separated by the first letter of each...ex: JohnBower
Is there any way to separate these with the Text to Columns function?
I have a list of names but the First and Last names are only separated by the first letter of each...ex: JohnBower
Is there any way to separate these with the Text to Columns function?
Here's one way. there must be a better formula, though!! This is an array formula, and a bit of a MONSTER.
Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.
Don't type the curly braces yourself - it won't work...
Formula:Please Login or Register to view this content.
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU
If all names consist of two words it can be done with a formula but if names are more complicated you would need VBA.
Here is an formula example:
Enter formula in B1 and copy down
Formula:Please Login or Register to view this content.
Edit: (Updated by request from Tony Valko) There maybe a situation where the first capital letter of the first name and the last name are the same. in this case formula may return an error or incorrect results. To avoid this use formula below
v A B 1 JohnBower John Bower 2 GeorgioArmani Georgio Armani
Formula:Please Login or Register to view this content.
Last edited by AlKey; 08-02-2016 at 06:23 PM.
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
not directly
this should answer your problems though
https://www.extendoffice.com/documen...al-letter.html
Regards
Sean
Please add to my reputation if you think i helped (click on the star below the post)
Mark threads as "Solved" if you have your answer (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [code]
Please supply a workbook containing example Data: It makes its easier to answer your problem & saves time!
This might be of use. It is an array formula so enter with Ctrl + Shift + Enter
Formula:Please Login or Register to view this content.
A B 1 JohnJackson John Jackson 2 DaveBrown Dave Brown 3 SueDavis Sue Davis
<---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.Ron W
Why not just use this? Enter with Ctrl + Shift + Enter
Formula:Please Login or Register to view this content.
ROW($65:$90)
@Tony Valko
LOL! Updated as requested in my original reply
That doesn't need array entry.
Try that on this name: AmyAdams
AlKey's other formula would work except for the ROW($65:$90)...
A1 = AmyAdams
=REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW($65:$90)),RIGHT(A1,LEN(A1)-1)),1)+1,," ")
Correctly returns Amy Adams.
However, insert a new row 2 and see what happens.
Thank you Tony!
Well deserved!
I get a #NUM! error no matter which formula I use for the name AmyAdams if I substitute a name that exists in a list with that name.
A B C D E F G H I J 4 TomJones Tom Jones Tom Jones Tom Jones Tom Jones 5 MarySmith Mary Smith Mary Smith Mary Smith Mary Smith 6 JoeBlow Joe Blow Joe Blow Joe Blow Joe Blow 7 AmyAdams #NUM! #NUM! #NUM! Amy Adams 8 JaneDoe Jane Doe Jane Doe Jane Doe Jane Doe
First formula =REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW($65:$90)),A1),2),," ")
Second formula =REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW(INDIRECT("65:90"))),A1),2),," ")
Third formula =REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW(A$65:A$90)),A1),2),," ")
This one that you supplied does work when substituting as above
Fourth forumula =REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW($65:$90)),RIGHT(A1,LEN(A1)-1)),1)+1,," ")
Been playing around with the problem. This is the latest that I have come up with using what has been proven successful.
Formula:Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks