+ Reply to Thread
Results 1 to 6 of 6

Return text string from charcater start and end point

  1. #1
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Excel 2010
    Posts
    31

    Return text string from charcater start and end point

    I am trying to return the first occurrence of a variable text string with-in brackets for all data on the spreadsheet using the "RIGHT" excel function, the text to search is in column D.

    Example for cells D2 & D3 reads:

    D2:Adv Costs (27a) - would return "27a"
    D3:Designer Unit (60) (Base) (50abc) - would return "50abc"

    Any help much appreciated.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Return text string from charcater start and end point

    Hi Dev
    do you want the first or last occurrence - the first would be 60 in D3, not 50abc

  3. #3
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Return text string from charcater start and end point

    Hi Nicky,
    I was using the first occurrence based on using the "RIGHT" excel function as I thought this would be easier? however it would be the last occurrence not using this function.

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Return text string from charcater start and end point

    this formula should return the contents of the first set of brackets in your string:

    Please Login or Register  to view this content.
    and this one should return the contents of the last set of brackets - sorry it's rather clunky, if a forum guru is around they can probably do something more elegant for you:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-16-2012
    Location
    Guernsey, C.I
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Return text string from charcater start and end point

    Cheers Nicky, works a treat.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Return text string from charcater start and end point

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [SOLVED] IF range of cells contains string of text, return contents of cell where string is found
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2013, 09:56 AM
  2. [SOLVED] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  3. Replies: 2
    Last Post: 02-26-2008, 03:22 PM
  4. Replies: 2
    Last Post: 11-15-2006, 11:04 PM
  5. SUM using string tag as start point
    By chaz in forum Excel General
    Replies: 7
    Last Post: 10-19-2006, 05:20 AM

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