+ Reply to Thread
Results 1 to 13 of 13

Excel 2007 : Remove the text after the number

  1. #1
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Remove the text after the number

    I would like for the number in the beginning to stay and delete everything including the "/"

    123456 / Home so 123456
    789012 / Remove so 789012
    Last edited by Jerseynjphillypa; 05-24-2012 at 09:23 AM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Remove the text after the number

    Try this...
    =LEFT(A1,FIND(" ",A1)-1)
    or
    =LEFT(A1,FIND("/",A1)-2)

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove the text after the number

    If you want to do this in situ, you can select the column, do a CTRL+H (Find/Replace) and enter this in the Find what box: /*
    Leave the other box blank and hit Replace All
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,653

    Re: Remove the text after the number

    I like the "in situ", Vito

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove the text after the number

    yeah, sometimes I like to through out a little Latin ad hoc or ad libitum

  6. #6
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Remove the text after the number

    thanks for all the help..

    Since some times it can also have only three number or have text and number before the /

  7. #7
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Remove the text after the number

    how would i do a vlookup if I all read have a number in another list but want to extract the text part as per ron advice

    =VLOOKUP(Sheet2!A2,Sheet3!$A:$A,1,FALSE) so

    =LOOKUP(Sheet2!A2,(LEFT(Sheet3!$A:$A,FIND("/",Sheet3!$A:$A)-2),1,false)

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,653

    Re: Remove the text after the number

    Quote Originally Posted by NBVC View Post
    yeah, sometimes I like to through out a little Latin ad hoc or ad libitum
    "Nunc est bibendum" also has a nice ring to it

  9. #9
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Remove the text after the number

    Quote Originally Posted by Jerseynjphillypa View Post
    how would i do a vlookup if I all read have a number in another list but want to extract the text part as per ron advice

    =VLOOKUP(Sheet2!A2,Sheet3!$A:$A,1,FALSE) so
    =LOOKUP(Sheet2!A2,(LEFT(Sheet3!$A:$A,FIND("/",Sheet3!$A:$A)-2),1,false)
    Can you post some samples for cell A2 and for the $A:$A range?

  10. #10
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Remove the text after the number

    I am trying to pull in the Total from sheet 2 into the Stock on Sheet 3.
    Attached Files Attached Files

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Remove the text after the number

    Perhaps you can use Sumif or Vlookup with wildcard

    e.g.

    =SUMIF(Sheet2!$A$2:$A$5,A2&" /*",Sheet2!$B$2:$B$5)
    or

    =VLOOKUP(A2&" /*",Sheet2!$A$2:$B$5,2,FALSE)

  12. #12
    Forum Contributor
    Join Date
    10-16-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Remove the text after the number

    Thanks for the help everyone

  13. #13
    Registered User
    Join Date
    10-10-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    1

    Thumbs up Re: Remove the text after the number

    Quote Originally Posted by Ron Coderre View Post
    Try this...
    =LEFT(A1,FIND(" ",A1)-1)
    or
    =LEFT(A1,FIND("/",A1)-2)

    Does that help?
    Thanks Ron,
    Its really simple & helpful..
    Last edited by atuldumbre; 10-10-2012 at 02:39 AM.

+ 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