+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Right & Search combo

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Right & Search combo

    Hi

    I basically want to search for "-" from the right of a cell and take anything after the "-" (Not including the -)

    See attached basic example. I've tried a whole host of search and right combos and don't seem to be getting what I need!!

    Thanks

    Right and search function.xlsx

  2. #2
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: Right & Search combo

    Is the format always the same irrespective of number of characters? i.e. Characters Dash Characters Dash Characters

    Text to columns would do it.
    Attached Files Attached Files
    Last edited by Russell Dawson; 05-10-2012 at 10:05 AM. Reason: File added
    If I helped, please don't forget to add to my reputation. (click on the star below the post)

    If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

    Failure is not falling down but refusing to get up.

  3. #3
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Re: Right & Search combo

    Text to columns would be messy.

    There may be 1-2, 1-2-3, 1-2-3-4, 1-2-3-4-5 . I'm only interested in the information after the last "-".

    If I was to use text to columns I would be hunting in different columns for this info?

    The simple way is to search from the end of the text string surely?

  4. #4
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: Right & Search combo

    Try this

    http://www.excelforum.com/excel-work...in-a-cell.html

    Post number 2 did it for me.

  5. #5
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    377

    Re: Right & Search combo

    Quote Originally Posted by Russell Dawson View Post
    Try this

    http://www.excelforum.com/excel-work...in-a-cell.html

    Post number 2 did it for me.
    Cheers

    =REPLACE(A2,1,LOOKUP(2^15,FIND("-",A2,ROW(INDIRECT("1:"&LEN(A2))))),"")

    Worked a treat as per attached Right and search function.xlsx

    I'm trying to workout how it works! I can't get my head round it, if anyone would like to break it down that would be great

+ 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