+ Reply to Thread
Results 1 to 7 of 7

How to delete unwanted text

  1. #1
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    How to delete unwanted text

    I have list of names with different number of character so if I want to get the first name, the =LEFT(B2;4) does not work and so as = Right(B2;5) for last name.

    Mohd Abdul bin Najib return should be Mohd
    Fatima binti Nor return should be Fatima
    Tan Mae Ling return should be Tan
    Mohd Ali Nazak return should be Mohd
    Md Najib Zaad return should be Md.



    Thank you.

  2. #2
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: How to delete unwanted text

    Hi

    Have you tried text to columns using space as your seperator.


    Chris
    Click my star if I helped Thanks

  3. #3
    Forum Contributor
    Join Date
    10-26-2012
    Location
    malaysia
    MS-Off Ver
    Excel 2010
    Posts
    138

    Re: How to delete unwanted text

    It works.. Thank you..

  4. #4
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: How to delete unwanted text

    Hi

    Pleased to help thanks for the rep and dont forget to mark your thread as solved


    Chris

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to delete unwanted text

    Hi jewellove

    Assuming your data is in column A try in A1 & copy down: =LEFT(A1,FIND(" ",A1)-1)
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  6. #6
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: How to delete unwanted text

    if you have "Mohd Abdul bin Najib" in cell A1:

    this will give you the first name "Mohd",

    Please Login or Register  to view this content.
    and this will give you the last name "Najib",

    Please Login or Register  to view this content.
    assumption is that 255 is the maximum length of any name in your data; you can change it to a different number if you need to.

    or,

    Please Login or Register  to view this content.
    or,

    Please Login or Register  to view this content.
    Last edited by icestationzbra; 12-28-2012 at 01:18 PM. Reason: simplifixation
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  7. #7
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to delete unwanted text

    @ icestationzbra

    =LEFT(A1,FIND(" ",A1))
    You might need to wrap in TRIM as you will have a extra character.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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