+ Reply to Thread
Results 1 to 10 of 10

Wildcards - Find & Replace

  1. #1
    Registered User
    Join Date
    08-30-2005
    Posts
    9

    Red face Wildcards - Find & Replace

    Can someone remind me how to do a find and replace on the following

    090226000/Jones/123 Main Street

    All data has numerical 9 places first field
    I need to eliminate the /Jones/123 Main Street
    so that I just have 090226000

    I thought * would work but it's not returning the
    correct output

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Wildcards - Find & Replace

    Replacing will turn the string 0##### into #####
    Maybe something like =left(a1,9)

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

    Re: Wildcards - Find & Replace

    Did you try /* (ie. slash and star)
    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
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Wildcards - Find & Replace

    Quote Originally Posted by NBVC View Post
    Did you try /* (ie. slash and star)
    NBVC,
    this solution deletes the initial 0 if there is one. Or is there some formatting to compensate?
    Last edited by NBVC; 07-20-2009 at 03:43 PM.

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Wildcards - Find & Replace

    If the number of characters is not always the same, this should still extract just the numeric portion.
    =LEFT(A1,LEN(A1)-(LEN(A1)-FIND("/",A1)+1))

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

    Re: Wildcards - Find & Replace

    The OP could format the result cell with Custom:

    000000000

    or

    pre-format column to Text via Data|Text to Columns and skip to 3rd window and choose Text from column data format area.

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

    Re: Wildcards - Find & Replace

    Quote Originally Posted by Palmetto View Post
    If the number of characters is not always the same, this should still extract just the numeric portion.
    =LEFT(A1,LEN(A1)-(LEN(A1)-FIND("/",A1)+1))
    Why not

    =Left(A1,Find("/",A1)-1)

  8. #8
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Wildcards - Find & Replace

    If the number of characters is not always the same, this should still extract just the numeric portion.
    =LEFT(A1,LEN(A1)-(LEN(A1)-FIND("/",A1)+1))

    Quote Originally Posted by NBVC View Post
    Why not

    =Left(A1,Find("/",A1)-1)
    OP statement :

    All data has numerical 9 places first field
    Why complicate things ?
    =left(a1,9)
    Last edited by arthurbr; 07-20-2009 at 03:29 PM.

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

    Re: Wildcards - Find & Replace

    You are correct... I was basing my response on Palmetto's proposal.

  10. #10
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Wildcards - Find & Replace

    Yeah . . . I agree.
    Guess we should always take the OP literally where it's obvious and not clutter the response with alternatives for conditions that may never exist.

+ 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