+ Reply to Thread
Results 1 to 10 of 10

Formula to extract strings

  1. #1
    Forum Contributor
    Join Date
    04-04-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Formula to extract strings

    Hello,

    Please help me to extract strings from hyphen separated text. spreadsheet attached.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Formula to extract strings

    In B2 Cell


    =IFERROR(MID(A2,FIND("-",A2,FIND("-",A2)+1)+1,FIND("^",SUBSTITUTE(A2,"-","^",LEN(A2)-LEN(SUBSTITUTE(A2,"-",""))))-FIND("-",A2,FIND("-",A2)+1)-1),"-")


    Drag it down


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,940

    Re: Formula to extract strings

    deleted due to misread
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Formula to extract strings

    Or this....

    In B2
    Please Login or Register  to view this content.
    and copy it down.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,940

    Re: Formula to extract strings

    Try
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Formula to extract strings

    Cell B2:

    =SUBSTITUTE(TRIM(LEFT(SUBSTITUTE(MID(A2,SEARCH("-",A2,SEARCH("-",A2)+1)+1,255),"-",REPT(" ",10)),LEN(SUBSTITUTE(MID(A2,SEARCH("-",A2,SEARCH("-",A2)+1)+1,255),"-",REPT(" ",10)))-10))," ","-")
    Quang PT

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,720

    Re: Formula to extract strings

    Another way
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  8. #8
    Forum Contributor
    Join Date
    04-04-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Re: Formula to extract strings

    Thanks...FlameRetired

  9. #9
    Forum Contributor
    Join Date
    04-04-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Re: Formula to extract strings

    Thank you.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,720

    Re: Formula to extract strings

    You're welcome.

+ 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] VBA code to extract strings
    By lostest in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-27-2015, 01:16 PM
  2. [SOLVED] How to extract strings from hyphen separated strings
    By sharathnarayanan in forum Excel General
    Replies: 5
    Last Post: 11-22-2014, 10:01 AM
  3. excel formula to search Multiple strings in several columns and return strings
    By krratna123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 11:20 AM
  4. Replies: 1
    Last Post: 08-13-2013, 08:32 AM
  5. extract numbers out of strings.
    By mikeburg in forum Excel General
    Replies: 3
    Last Post: 08-06-2008, 04:52 PM
  6. [SOLVED] HOW TO EXTRACT STRINGS FROM CELLS
    By vidhya in forum Excel General
    Replies: 2
    Last Post: 11-17-2005, 08:45 AM
  7. [SOLVED] Extract numbers from strings
    By Stan Altshuller in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-18-2005, 10:06 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