+ Reply to Thread
Results 1 to 21 of 21

Extracting text string from cell with no delimiters

  1. #1
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Question Extracting text string from cell with no delimiters

    Hi

    I am looking to extract non-delimited values from a cell.

    In my attached test data

    Column A is the product code
    Column C is the non-delimited product codes in a customer order
    Column E through H+ is how I would like the data extraced and displayed.

    Out system exports order data showing all ordered products in the same cell with no delimiter.

    I am hoping to find a way to search in Column A for a value and if found in Column C it should add that value to a new adjacent cell, for each matched value.

    Regards
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,586

    Re: Extracting text string from cell with no delimiters

    How would Excel know how many characters to pull into each column? Without any logic and with such vague sample data, this task is a non-starter (Excel won't be able to do it).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Extracting text string from cell with no delimiters

    Please tell us the rules for the extraction columns E thru H.
    They're of varying lengths; for starters, and how is Excel to know what to look for, and what to report for each column. Need to understand the logic.
    Thanks.

    Pete

  4. #4
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    Hi

    Apologies, maybe my example data isn't comprehensive enough.

    The "product code" examples are set values. I am hoping that that set value can be searched for within the non-delimited strings in column C in order to extract that value and add them to separate adjacent cells.

    I had a similar enquiry last year that was solved, however the logic was a little different so the solution formula from that one doesn't quite work.

    Let me know if that explains it enough.

    Regards

  5. #5
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    For some further clarification

    (the only reason i put the column in A, C and E was for clarity. The actual spreadhseet will have them adjacent)

    The full product list will be in column A (2600+ products)
    Every product code will be unique

    The orders list in Column C is made up of anywhere from 1 - 10 products all in the same cell with no delimiter.

    I can't do anything with a cell with 10 product codes all touching with no delimiter.

    I am looking for a way to look in each cell in column C then search Column A to see if a matched value is found.

    If a matched value is found it should be extract and put in its own cell.

    When I said E through H, i meant that depending on the number of matched values in Column C, there may be 1 new column created, or there may be 10.

    I hope that clarifies a little more.

    Regards

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Extracting text string from cell with no delimiters

    based only on the first post

    PC.1 PC.2 PC.3 PC.4
    abcde jklmn ww
    ww pppp bmbm aabbcc
    ww
    abcde ww bmbm
    jklmn ww pppp bmbm


    is that what you want?
    verify your expected result
    Last edited by sandy666; 02-22-2023 at 11:19 AM.

  7. #7
    Valued Forum Contributor PeteABC123's Avatar
    Join Date
    09-21-2012
    Location
    Chicago, IL
    MS-Off Ver
    MS Office 365 ver 2202
    Posts
    1,104

    Re: Extracting text string from cell with no delimiters

    In E3, how does the formula know to return ww?
    In E4, how does the formula know to return abcde?

    and so forth for all the columns.
    Thx

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,586

    Re: Extracting text string from cell with no delimiters

    Please provide more realistic sample data. Tell us everything here - please don't expect members to go and read an older thread in order to help you. Thanks.

  9. #9
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    My apologies, I tried to give sample data so as not to provide actual data as I thought it may be against the terms, but I don't mind if it will explain better.

    Please see revised attached document.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    Yes, this is how I am hoping to display the extracted data.

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Extracting text string from cell with no delimiters

    how about post#6 ?

  12. #12
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    Quote Originally Posted by sandy666 View Post
    based only on the first post

    PC.1 PC.2 PC.3 PC.4
    abcde jklmn ww
    ww pppp bmbm aabbcc
    ww
    abcde ww bmbm
    jklmn ww pppp bmbm


    is that what you want?
    verify your expected result
    Yes, this is how I am hoping to display the extracted data.

  13. #13
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Extracting text string from cell with no delimiters

    Quote Originally Posted by MrRAMMounts View Post
    Yes, this is how I am hoping to display the extracted data.
    so you can use Power Query

    Please Login or Register  to view this content.
    Last edited by sandy666; 02-22-2023 at 11:34 AM.

  14. #14
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    Does Power Query require advanced knowledge to use?

    I have never used it before

  15. #15
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Extracting text string from cell with no delimiters

    try to learn from here: Power Query

    Power Query isn't harder than formulas, it's just a different way of thinking

  16. #16
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,848

    Re: Extracting text string from cell with no delimiters

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. No help to be offered until you provide a link or, for members with fewer than 10 posts, a comment telling us where else you have posted this query.)
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  17. #17
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    Quote Originally Posted by 6StringJazzer View Post
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important: https://excelguru.ca/a-message-to-forum-cross-posters/

    (Note: this requirement is not optional. No help to be offered until you provide a link or, for members with fewer than 10 posts, a comment telling us where else you have posted this query.)
    I have crossposted to this link - https://www.mrexcel.com/board/thread.../#post-6023134

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,798

    Re: Extracting text string from cell with no delimiters

    Please Login or Register  to view this content.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  19. #19
    Registered User
    Join Date
    04-16-2019
    Location
    London
    MS-Off Ver
    O365 (PC) V 2210
    Posts
    56

    Re: Extracting text string from cell with no delimiters

    Quote Originally Posted by JohnTopley View Post
    Please Login or Register  to view this content.
    Is that a power query solution?

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,798

    Re: Extracting text string from cell with no delimiters

    No ... it is VBA (Visual Basic for Application) code : a macro.
    Last edited by JohnTopley; 02-22-2023 at 01:01 PM.

  21. #21
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,908

    Re: Extracting text string from cell with no delimiters

    Try this,

    I2
    =IF(COLUMNS($I:I)<=COUNT(IF($A$2:$A$100<>"",FIND($A$2:$A$100,$D2))),INDEX($A:$A,MOD(AGGREGATE(15,6,(IF($A$2:$A$100<>"",FIND($A$2:$A$100,$D2))*10^6+ROW($A$2:$A$100))/(IF($A$2:$A$100<>"",FIND($A$2:$A$100,$D2)>0)),COLUMNS($I:I)),10^6)),"")

    copied down and across.
    Attached Files Attached Files
    Last edited by windknife; 02-26-2023 at 12:17 PM.

+ 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. Macro to split text string based on its various structure/delimiters
    By Velehrad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2020, 02:52 PM
  2. Macro to split text string based on its various structure/delimiters
    By Velehrad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2020, 11:24 PM
  3. Extract string of text in the middle of 2 delimiters
    By MoldyBread in forum Excel General
    Replies: 3
    Last Post: 05-07-2018, 07:21 AM
  4. [SOLVED] Extracting string between two specific delimiters among many of the same character.
    By DaniLucas in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-18-2016, 12:48 PM
  5. [SOLVED] Extracting a certain string of text from a cell
    By Jnap in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-02-2015, 10:25 PM
  6. Replies: 2
    Last Post: 04-09-2014, 11:48 AM
  7. Replies: 2
    Last Post: 09-07-2010, 04:14 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