+ Reply to Thread
Results 1 to 10 of 10

IF List, Extract text before first comma ELSE copy value

  1. #1
    Registered User
    Join Date
    03-09-2016
    Location
    Detroit
    MS-Off Ver
    365
    Posts
    8

    IF List, Extract text before first comma ELSE copy value

    I hope the title is self explanatory.

    Basically I have a text column with data values seperated by commas as well single data points within cells. If the value contains a list I would like to extract text before first comma Else I would like to just copy the single data point into a new row.

    As well, would it be possible to go further and extract and subsequent substring in between commas or after into new columns...?

    excel question example.jpg
    Last edited by argou001; 03-24-2021 at 11:13 AM. Reason: add .xls attachment

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,624

    Re: IF List, Extract text before first comma ELSE copy value

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,624

    Re: IF List, Extract text before first comma ELSE copy value

    Also... please confirm that you are still using Excel 2003, or UPDATE your profile...

  4. #4
    Registered User
    Join Date
    03-09-2016
    Location
    Detroit
    MS-Off Ver
    365
    Posts
    8

    Re: IF List, Extract text before first comma ELSE copy value

    Edit 2008...
    Last edited by argou001; 03-24-2021 at 11:07 AM.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,624

    Re: IF List, Extract text before first comma ELSE copy value

    That's a non-editable picture. I asked for an Excel file!!!!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,624

    Re: IF List, Extract text before first comma ELSE copy value

    However, this should do what you want:

    =TRIM(MID(SUBSTITUTE(","&$A2,",",REPT(" ",125)),125*COLUMNS($A:A),125))

    dragged across and down.

  7. #7
    Registered User
    Join Date
    03-09-2016
    Location
    Detroit
    MS-Off Ver
    365
    Posts
    8

    Re: IF List, Extract text before first comma ELSE copy value

    attachment is in original post.

    I am getting a SPILL error message.

    Thanks for your help btw!!!
    Last edited by argou001; 03-24-2021 at 11:35 AM.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,624

    Re: IF List, Extract text before first comma ELSE copy value

    And did you try the formula?

  9. #9
    Registered User
    Join Date
    03-09-2016
    Location
    Detroit
    MS-Off Ver
    365
    Posts
    8

    Re: IF List, Extract text before first comma ELSE copy value

    ahh i see now...

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,624

    Re: IF List, Extract text before first comma ELSE copy value

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

+ 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. Extract largest value from comma separated alpha numeric list in cell
    By nickytraps in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-16-2019, 11:00 PM
  2. Extract String from comma delimited list in cell
    By Beats.Nigel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-13-2019, 08:48 AM
  3. [SOLVED] Extract Text After Second To Last Comma in A Text String
    By ChaidaJones in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-05-2016, 02:00 PM
  4. [SOLVED] How to extract words from a text string separated by comma
    By shukla.ankur281190 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-22-2015, 04:16 AM
  5. [SOLVED] Extract list - Comma separated
    By TheCman81 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-28-2014, 09:29 AM
  6. [SOLVED] Help needed on how to extract substrings from comma delimited text
    By kknb0800 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-18-2013, 03:18 PM
  7. Extract postcode after last comma in text string
    By TheRobsterUK in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2013, 09:35 AM

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