+ Reply to Thread
Results 1 to 16 of 16

Text to Columns by Capital Letters

  1. #1
    Forum Contributor
    Join Date
    05-04-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    106

    Text to Columns by Capital Letters

    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?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,298

    Re: Text to Columns by Capital Letters

    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: copy to clipboard
    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

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text to Columns by Capital Letters

    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: copy to clipboard
    Please Login or Register  to view this content.

    v A B
    1 JohnBower John Bower
    2 GeorgioArmani Georgio Armani
    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
    Formula: copy to clipboard
    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

  4. #4
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Text to Columns by Capital Letters

    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!

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Text to Columns by Capital Letters

    This might be of use. It is an array formula so enter with Ctrl + Shift + Enter
    Formula: copy to clipboard
    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

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text to Columns by Capital Letters

    Quote Originally Posted by AlKey View Post
    =REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW(A$65:A$90)),RIGHT(A1,LEN(A1)-1)),1)+1,," ")
    I'll give ya some rep if you change this:

    ROW(A$65:A$90)

    To this:

    ROW(INDIRECT("65:90"))

    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Text to Columns by Capital Letters

    Why not just use this? Enter with Ctrl + Shift + Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    ROW($65:$90)

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text to Columns by Capital Letters

    @Tony Valko
    LOL! Updated as requested in my original reply

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text to Columns by Capital Letters

    Quote Originally Posted by AlKey View Post
    @Tony Valko
    LOL! Updated as requested in my original reply
    The first formula needs to be changed also!

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text to Columns by Capital Letters

    Quote Originally Posted by Tony Valko View Post
    The first formula needs to be changed also!
    Done!!!!!!!!

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text to Columns by Capital Letters

    Quote Originally Posted by newdoverman View Post
    Why not just use this? Enter with Ctrl + Shift + Enter
    =REPLACE(A1,AGGREGATE(15,6,FIND(CHAR(ROW($65:$90)),A1),2),," ")

    ROW($65:$90)
    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.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text to Columns by Capital Letters

    Quote Originally Posted by AlKey View Post
    Done!!!!!!!!
    Very nice!

    Here ya go...

  13. #13
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Text to Columns by Capital Letters

    Thank you Tony!

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Text to Columns by Capital Letters

    Well deserved!

  15. #15
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Text to Columns by Capital Letters

    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,," ")

  16. #16
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Text to Columns by Capital Letters

    Been playing around with the problem. This is the latest that I have come up with using what has been proven successful.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Convert text to capital letters
    By jirakst in forum Excel General
    Replies: 4
    Last Post: 05-02-2015, 02:18 PM
  2. [SOLVED] Not differentiating between capital letters and lower case letters
    By Eliot Y in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-22-2015, 11:13 AM
  3. Replies: 4
    Last Post: 03-20-2014, 01:39 PM
  4. [SOLVED] Returning a value if text is in capital letters
    By jennieS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-19-2013, 08:31 AM
  5. Replies: 13
    Last Post: 07-08-2012, 11:26 PM
  6. Text to Coloumns, by consecutive capital letters
    By paperclip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2006, 07:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1