+ Reply to Thread
Results 1 to 4 of 4

Return the string between two character numbers

  1. #1
    Registered User
    Join Date
    09-29-2008
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    42

    Return the string between two character numbers

    Hi everyone,

    I would like to find out how I can return a string between two specific character numbers.

    Example,

    Apple Pear Cider

    I know "apple" in my cell starts in the 15th character & Cider starts as the 26th character, how do I return the pear string?


    Thank you!
    Last edited by rhua5436; 09-30-2011 at 01:26 AM.

  2. #2
    Registered User
    Join Date
    09-29-2008
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    42

    Re: Return the string between two character numbers

    in addition, the length of the string using pear as an example varies. might be 8 characters long etc.
    But I would definitely know the character positions of apple and cider using search function.
    How do I return that string in the middle?

    thank you!

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Return the string between two character numbers

    If you know the position of the first character in apple (say 15) and the first character in cider (26) then a function like:

    Please Login or Register  to view this content.
    should do the trick.

    If you want a more complex formula that just determins the position of apple and cider and then cut out the string between you could try:

    Please Login or Register  to view this content.
    Both formulas assumes that your string is found in cell D4.

    Alf

  4. #4
    Registered User
    Join Date
    09-29-2008
    Location
    Sydney
    MS-Off Ver
    2016
    Posts
    42

    Re: Return the string between two character numbers

    thank you so much!

+ 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