+ Reply to Thread
Results 1 to 7 of 7

Extract Specific Numbers and Text from long string

  1. #1
    Registered User
    Join Date
    03-11-2017
    Location
    Cairo, Egypt
    MS-Off Ver
    2016
    Posts
    11

    Question Extract Specific Numbers and Text from long string

    Hi,

    Can you please help me in extracting the code highlighted in red in column "C" to a seperate column "D" as shown in the below pic.
    Column "C" contains list of codes and the codes I am looking for are both in TEXT & NUMBERS.
    These codes in red will not be repeated in other products.


    if possible, I prefer to use the "Model Version Code Table" as a ref. to provide more dynamic solution as I have a big list of codes and the below are just samples of data.
    Attached is the sample excel sheet.

    P.S. I'm using MS Excel 2016 and I am looking for a solution please only through "Formulas", not through "Text to Columns" option.

    Product Codes Picture.png

    Thanks in advance :)
    Attached Files Attached Files
    Last edited by Bisso; 10-03-2020 at 05:50 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Extract Specific Numbers and Text from long string

    Formula for D14 =INDEX(H:H,MAX(ISNUMBER(FIND(codes[Model Version Code],C3))*ROW(codes[Model Version Code])),1)

    Formula for E14 =INDEX(I:I,MAX(ISNUMBER(FIND(codes[Model Version Code],C3))*ROW(codes[Model Version Code])),1)
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    03-11-2017
    Location
    Cairo, Egypt
    MS-Off Ver
    2016
    Posts
    11

    Re: Extract Specific Numbers and Text from long string

    Quote Originally Posted by mehmetcik View Post
    Formula for D14 =INDEX(H:H,MAX(ISNUMBER(FIND(codes[Model Version Code],C3))*ROW(codes[Model Version Code])),1)

    Formula for E14 =INDEX(I:I,MAX(ISNUMBER(FIND(codes[Model Version Code],C3))*ROW(codes[Model Version Code])),1)
    Thanks, but it didn't work.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract Specific Numbers and Text from long string

    Please try at
    D14
    =LOOKUP(0,-MATCH("*"&codes[Model Version Code]&"*",C14,),codes[Model Version Code])

    E14
    =VLOOKUP(D14,codes,2,0)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-11-2017
    Location
    Cairo, Egypt
    MS-Off Ver
    2016
    Posts
    11

    Re: Extract Specific Numbers and Text from long string

    Quote Originally Posted by Bo_Ry View Post
    Please try at
    D14
    =LOOKUP(0,-MATCH("*"&codes[Model Version Code]&"*",C14,),codes[Model Version Code])

    E14
    =VLOOKUP(D14,codes,2,0)
    Wow! Thanks a lot, it works

  6. #6
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Extract Specific Numbers and Text from long string

    Quote Originally Posted by Bisso View Post
    Wow! Thanks a lot, it works
    The first solution also works...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-11-2017
    Location
    Cairo, Egypt
    MS-Off Ver
    2016
    Posts
    11

    Re: Extract Specific Numbers and Text from long string

    Quote Originally Posted by belinda200 View Post
    The first solution also works...
    Yeah, my bad. Thanks dear.
    added reputation to mehmetcik

+ 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. VBA Macro to extract multiple bit of data from long text string in single cell in Excel
    By RickyGerbilFace in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-06-2020, 07:54 PM
  2. Extract numbers after a specific text from a text string
    By robertovm28 in forum Excel General
    Replies: 7
    Last Post: 04-23-2019, 09:53 PM
  3. Replies: 9
    Last Post: 03-09-2015, 10:15 PM
  4. Extract specific numbers from a string of text
    By Galwaygirl13 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-19-2012, 03:22 PM
  5. what formula to extract text from a long string?
    By SEMMatt in forum Excel General
    Replies: 5
    Last Post: 10-07-2012, 10:23 PM
  6. [SOLVED] Extract specific value from a long text string
    By Dinesh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-10-2006, 11:30 PM
  7. Extract sub-string of number from field of long series of numbers
    By ExcelExtrator in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-27-2005, 07:00 PM

Tags for this Thread

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