+ Reply to Thread
Results 1 to 18 of 18

how to strip out names from a cell and flip around, first name last name

  1. #1
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    how to strip out names from a cell and flip around, first name last name

    How can I strip out a name from a cell, see example below, I would need to remove the number and flip the name. Any ideas. Thanks.

    example:
    Column A = Column B results
    Blow/Joe 123456 = Joe Blow
    Johnson/Mike 898930 = Mike Johnson
    Mama/Joe 293810 = Joe Mama
    Smith/John 389301 = John Smith

  2. #2
    Valued Forum Contributor
    Join Date
    07-07-2014
    Location
    Washington DC
    MS-Off Ver
    2007
    Posts
    1,047

    Re: how to strip out names from a cell and flip around, first name last name

    Just use the text to columns feature. First delimit based on spaces, then delimit based on "/". Then concatenate the first and last name in the desired order.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,768

    Re: how to strip out names from a cell and flip around, first name last name

    are they all

    name/name space?
    or was that just your example
    so everything upto the first space is the name
    and then the / splits the name
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: how to strip out names from a cell and flip around, first name last name

    With data in A1, in B1 enter:

    =MID(A1,FIND("/",A1,1)+1,FIND(" ",A1)-FIND("/",A1)) & " " & LEFT(A1,FIND("/",A1)-1)

    See the attached example
    Attached Files Attached Files
    Last edited by Jakobshavn; 07-26-2014 at 07:14 AM.
    Gary's Student

  5. #5
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: how to strip out names from a cell and flip around, first name last name

    @ etaf, yes everything is the same but sometime it can be two first names, ie. Smith/John Michael 129321

    @Jakobshaven, that formula is giving me a Value error

  6. #6
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: how to strip out names from a cell and flip around, first name last name

    I love this one
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Cell A1 is where the original data is.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  7. #7
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: how to strip out names from a cell and flip around, first name last name

    or it can be: smith jones/john michael 123421. It's really anything left of the six numbers and flip the names on each side of the "/"

    The consistentancy of the data is that it's always six numbers at the end and first and last is split with a "/", but first and last can be two names.

    smith jones/john michael 123421 = john michael smith jones
    Last edited by Mile029; 07-25-2014 at 04:07 PM.

  8. #8
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: how to strip out names from a cell and flip around, first name last name

    smith jones/john michael 123421
    Tried that one. Still works

  9. #9
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: how to strip out names from a cell and flip around, first name last name

    yes, Tsjallie, that works, wow, what a formula. thought it would be easier, but I'll use it. Thanks!

  10. #10
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: how to strip out names from a cell and flip around, first name last name

    what a formula
    Yes, I feel a bit ashamed
    Need explaination?
    Also you can step thru the formula with the Evaluate Function option in the Formalas menu of the ribbon.
    Substituting parts of the formula with names would make it more readable.
    And so would putting it into a User Defined Function.
    Last edited by Tsjallie; 07-25-2014 at 04:38 PM.

  11. #11
    Forum Contributor
    Join Date
    03-14-2005
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    172

    Re: how to strip out names from a cell and flip around, first name last name

    Thanks Tsjallie, totally works, but now I have a new hurdle, after going through all the records, about 50K, some don't have the numbers at the end, so gotta figure that out. Thanks.

  12. #12
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: how to strip out names from a cell and flip around, first name last name

    I knew this would come Forgot to add that. Get back to you later. Solution is very simple. Will add example with names and a clarification of the construction.

  13. #13
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: how to strip out names from a cell and flip around, first name last name

    some don't have the numbers at the end, so gotta figure that out
    I assumed you got an error on that because FIND wouldn't find anything, but that's not the case because [A1&"0123456789"] is dealing with that.
    So what problem do you encounter?

  14. #14
    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: how to strip out names from a cell and flip around, first name last name

    Maybe as a little bit smaller formula

    =TRIM(MID(SUBSTITUTE(REPLACE(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&1234567890)),255,""),"/",REPT(" ",255)),255,255))&" "&TRIM(LEFT(SUBSTITUTE(A1,"/",REPT(" ",255)),255))

    A
    B
    1
    Blow/Joe 123456 Joe Blow
    2
    Johnson/Mike 898930 Mike Johnson
    3
    Mama/Joe 293810 Joe Mama
    4
    Smith/John 389301 John Smith
    5
    smith jones/john michael 123421 john michael smith jones
    Last edited by AlKey; 07-29-2014 at 07:20 AM.
    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

  15. #15
    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: how to strip out names from a cell and flip around, first name last name

    Or this

    =IF(ISNUMBER(RIGHT(A1)+0),REPLACE(LEFT(A1,LEN(A1)-7),1,FIND("/",LEFT(A1,LEN(A1)-7)),"")&" "&LEFT(A1,FIND("/",A1)-1),MID(A1,FIND("/",A1)+1,100)&" "&LEFT(A1,FIND("/",A1)-1))
    Last edited by AlKey; 07-29-2014 at 07:24 AM.

  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: how to strip out names from a cell and flip around, first name last name

    This should work with strings as given:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If a middle name is used then this will work:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 07-26-2014 at 03:56 PM.
    <---------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

  17. #17
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: how to strip out names from a cell and flip around, first name last name

    Not sure about the alternative formulas.
    They all assume the number is there and the number is 6 digits long (or 7 including a space).
    Can't get 'm to work on a cell when the number is missing.

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

    Re: how to strip out names from a cell and flip around, first name last name

    @Tsjallie

    See message 7.

+ 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. [SOLVED] Strip out numbers from a cell
    By pauldaddyadams in forum Excel General
    Replies: 13
    Last Post: 07-10-2013, 03:42 AM
  2. Flip of text in an excel cell
    By Nasir Sajid in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-13-2012, 06:10 AM
  3. Flip Text in a Cell
    By gouverneurcc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2010, 08:11 PM
  4. Mirror/flip cell
    By traaymakers in forum Excel General
    Replies: 7
    Last Post: 11-18-2009, 03:28 PM
  5. how to flip text from a cell
    By devbox in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-18-2005, 03:43 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