+ Reply to Thread
Results 1 to 9 of 9

Find and Mid to extract

  1. #1
    Registered User
    Join Date
    04-04-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    13

    Find and Mid to extract

    Dear Friends,

    Please I need to find "-" and extract the character, I do not want to use convert Text to columns wizard by using delimited characters, I need the formula which i can put in column B1

    for example:
    in column A1 = "Mr.Sam - Further to our conversation - I wish to confirm that - we would like to - arrange a demo"
    it has 4nos "-" in a A1 cell, might be more "-" in some of the lines.
    how could i extract only the third part after 2nd hyphen "-"
    I want
    in column B1 = "I wish to confirm that"
    in column C1 = "Further to our conversation"
    in column D1 = "Mr.Sam"

    this formula work for D1 = "MR.Sam" =TRIM(IFERROR(LEFT(A1,(FIND("-",A1)-1)),LEFT(A1,8)))

    Thanks

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Find and Mid to extract

    Why not use Text To Columns?
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    04-04-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find and Mid to extract

    I do not want to use convert Text to columns wizard, I need the formula

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find and Mid to extract

    It is rather strange that you want to extract parts of the string backwards., but try this in B1 and pull formula to the right

    =TRIM(MID(SUBSTITUTE($A1,"-",REPT(" ",255)),(COLUMNS($A:$C)-COLUMNS($A:A))*255+1,255))

    Row\Col
    A
    B
    C
    D
    1
    Mr.Sam - Further to our conversation - I wish to confirm that - we would like to - arrange a demo I wish to confirm that Further to our conversation Mr.Sam
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    04-04-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find and Mid to extract

    Thankyou very much Alkey

    please can you also give the formula if i want to extract in sequence one after another same function as used in Text to Columns

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find and Mid to extract

    In B1 and pull formula to the right until you see blanks.

    =TRIM(MID(SUBSTITUTE("-"&$A1,"-",REPT(" ",255)),COLUMNS($A:A)*255,255))

    Row\Col
    A
    B
    C
    D
    E
    F
    1
    Mr.Sam - Further to our conversation - I wish to confirm that - we would like to - arrange a demo Mr.Sam Further to our conversation I wish to confirm that we would like to arrange a demo

  7. #7
    Registered User
    Join Date
    04-04-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find and Mid to extract

    Hia, again I need some help please,
    I have following raw data in one column
    A1 = a:1:{s:16:"m2epro_extension";a:1:{s:5:"items";a:1:{i:0;a:2:{s:7:"item_id";s:12:"251130406951";s:14:"transaction_id";s:13:"1593701358015";}}}}

    I need to extract Item_Id = 251130406951 in column B1 & transaction_id = 1593701358015 in column C1
    so need formula which i will put in cell B1 & C1

    Row/Col A B C
    1 a:1:{s:16:"m2epro_extension";a:1:{s:5:"items";a:1:{i:0;a:2:{s:7:"item_id";s:12:"251130406951";s:14:"transaction_id";s:13:"1593701358015";}}}} 251130406951 1593701358015

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find and Mid to extract

    Try these two
    for B1

    =MID(A1,SEARCH("item_id",A1)+15,12)

    for C1

    =MID(A1,SEARCH("transaction_id",A1)+22,13)

    this will work providing item_id and transaction_id will have 12 and 13 characters respectively.

  9. #9
    Registered User
    Join Date
    04-04-2012
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find and Mid to extract

    Great Thank you

+ 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] Extract strings from first dot find..???
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-18-2013, 11:16 PM
  2. [SOLVED] Extract a substring with find and mid
    By AlexRoberts in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-08-2013, 04:02 AM
  3. find and extract row based on column max value
    By felipepanza in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-05-2013, 09:09 AM
  4. [SOLVED] Extract Find and Concatenate
    By Oceans in forum Excel General
    Replies: 12
    Last Post: 11-27-2012, 12:43 PM
  5. [SOLVED] Find max in one row and extract value from another
    By JohannesFust in forum Excel General
    Replies: 6
    Last Post: 04-10-2012, 02:34 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