+ Reply to Thread
Results 1 to 7 of 7

Text functions

  1. #1
    Registered User
    Join Date
    10-21-2014
    Location
    Michigan
    MS-Off Ver
    2013
    Posts
    4

    Text functions

    I have to return the position of the ",", the first name only, and last name only in another column using text functions. I have no idea where to even begin with this. I can of course get one name from one column to another, but if I copy it down the formula doesn't work.
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: Text functions

    Use FIND to get the position.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    You can then use that in LEFT, RIGHT and MID functions to determine how many characters to return.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Text functions

    use find() to get the position of the ,
    then use left() and mid() using the value found in find
    i'd do it all but i suspect this is some sort of homework
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    10-16-2014
    Location
    Center Line, Michigan, United States
    MS-Off Ver
    MS Office 2013
    Posts
    139

    Re: Text functions

    In cell B2, put
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In cell C2, put
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In cell D2, put
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Text functions

    Nothing is more frustrating than to be working on homework and to get stuck. Without guidance, you might have no hope of finishing the assignment before the deadline. The Internet can be a big help in that respect, but without learning how to get the right answer, asking others to solve your homework questions for you simply becomes a downward spiral (and it's cheating).

    We do not want to contribute to you cheating yourself out of your education, but we also acknowledge that seeking assistance to learn a concept is a legitimate request.

    If you are genuinely interested in receiving help in the form of tutoring or coaching, then please rephrase the title of your original post to clearly indicate you are seeking coaching or tutoring help. Any forum members (who are willing to assist as a tutor) will modify their responses accordingly to facilitate your learning. Tutors don't tell you the answers, they help you figure it out for yourself; so don't expect answers, expect suggestions, or just plain hints. Also, be specific in describing the function/formula or technique you trying to learn, and tell us what you have attempted so far. Otherwise, expect your plea for homework answers to be ignored.

  6. #6
    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 functions

    Or simply use these two formulas

    for First Name:

    =TRIM(RIGHT(SUBSTITUTE(A2,",",REPT(" ",25)),25))

    for Last Name:

    =TRIM(LEFT(SUBSTITUTE(A2,",",REPT(" ",25)),25))

    Row\Col
    A
    B
    C
    1
    Name First Name - Only Last Name - Only
    2
    ackerman, jerry jerry ackerman
    3
    adams, cecilia cecilia adams
    4
    arston, jean jean arston
    5
    aziz, nashir nashir aziz
    6
    bertin, julia julia bertin
    7
    booth, wesley wesley booth
    8
    bose, denise denise bose
    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

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Text functions

    Hi monsoup,

    See if the attached isn't what you really want. This trick is to replace the comma with a bunch of spaces. The number of spaces are equal to the length of the original string. Then take the left side and TRIM the spaces away to get the last name and the right side to get the first name. See the attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. Replies: 1
    Last Post: 02-25-2013, 04:25 PM
  2. [SOLVED] Removing text from scores in a data sheet using text functions
    By mrvp in forum Excel General
    Replies: 9
    Last Post: 07-15-2012, 05:33 PM
  3. Text Box functions
    By sivdin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2011, 02:49 PM
  4. Text Functions,
    By Lowell in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-24-2005, 05:05 AM
  5. Text functions
    By Btibert in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-06-2005, 03:18 PM

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