+ Reply to Thread
Results 1 to 17 of 17

Separating values

  1. #1
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Separating values

    Hello All,
    In the attached file I have values on Column A of the Raw Tab. For each value on column A there are a number of corresponding values in columns O and P. I need to create a summary where values in columns O and P are separated and it looks like the example in Summary Tab.

    Any assistance would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,301

    Re: Separating values

    On your Summary sheet - change the '100's in the formulas to something higher than your actual last row

    In O2:
    =TEXTSPLIT(TEXTJOIN(",",,Raw!O2:O100),,",")

    In P2:
    =TEXTSPLIT(TEXTJOIN(",",,Raw!P2:P100),,",")

    In A2:
    =IFERROR(INDEX(Raw!A:A,MATCH($O$2#,LEFT(Raw!$O$1:$O$100,9),FALSE)),"")

    In N2:
    =IFERROR(INDEX(Raw!N:N,MATCH($O$2#,LEFT(Raw!$O$1:$O$100,9),FALSE)),"")
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,501

    Re: Separating values

    Maybe this:

    PHP Code: 
    =LET(data,TRIMRANGE(Raw!A2:P1000),a,INDEX(data,,1),n,INDEX(data,,14),o,INDEX(data,,15),p,INDEX(data,,16),HSTACK(WRAPROWS(TEXTSPLIT(TEXTJOIN("|",,MAP(a,n,o,LAMBDA(a,n,o,TEXTJOIN("|",,a&"|"&n&"|"&TEXTSPLIT(o,","))))),"|"),3),TEXTSPLIT(TEXTJOIN(",",,p),,","))) 
    Last edited by TMS; 03-21-2025 at 06:19 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Thanks TMS. Are you able to attach a copy of the outcome? Im not sure I understand exactly how to apply.

  5. #5
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Hey Bernie, are you able to attach the outcome?
    I do not understand exactly what to apply where.
    Thank you!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,501

    Re: Separating values

    Sure, this updated file has both approaches. I've adjusted the order of Bernie's formulae.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Thank you, TMS, very much appreciated.
    One more question: The data I need to run these formulae runs into the thousands of rows. Whan I try to run changing the numbers it gives a CALC error. Looking at the formula error it says text is too long. Do you have any suggestions?

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

    Re: Separating values

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

  9. #9
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Windknife. Thank you so much for your input, and thank you for the late reply. I applied it but it's giving an error message-Please see attached. Is there any way you can apply in the attached and post the outcome? I only need columns A,N,O,P.

    Thanks!
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Meant sorry for the late reply

  11. #11
    Registered User
    Join Date
    08-27-2012
    Location
    Dubai
    MS-Off Ver
    MS 365 Apps for Business
    Posts
    21

    Re: Separating values

    Updated file using formula from Windknife :
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Thank you very much for the quick response. Im trying to apply this formula by either coping what you entered in the outcome, rewriting it allover again from the beginning but just seems to be too finicky, and gives the error "#NAME?
    ". I even tried to copy and paste values from the file you sent to just below the row 5, and once I do that the formula disappeared and the error #NAME? shows up. Is there any advice? Anything I am missing? I am very sorry for all these may be non sense questions, but at the same time very appreciative of your time!

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,501

    Re: Separating values

    That normally means that one or more of the functions is not available in your version of Excel, or one of the variables used has not been defined, or a misspelling, etc.

    Given the formula works for me, and others, it's not the variables. So, that leaves either a user input error, or the version of Excel is not fully updated.

    I'd suggest checking/forcing an update and trying again.

  14. #14
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Thanks TMS!
    Could there possibly be another, simpler formula?

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

    Re: Separating values

    You don't have 'raw' sheet. If you use formula in the same sheet, try this
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by windknife; 03-26-2025 at 10:50 PM.

  16. #16
    Registered User
    Join Date
    09-07-2021
    Location
    Michigan, US
    MS-Off Ver
    365
    Posts
    35

    Re: Separating values

    Hi Windknife. Thank you kindly for the update. I really appreciate it.
    Im not sure why I cant make this formula work. My version of excel is 365 and is all updated. I have attached the file in here, I would greatly appreciate it if you could apply the formula one more time. Please note that there are rows where columns "O" and "P" are empty and I need to keep them in there. Also, Please keep in mind that I might need to add a couple more thousands rowsThanks!
    Attached Files Attached Files

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

    Re: Separating values

    One guess, try this in Q6.
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Separating Unique values
    By Stevenbossche in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-20-2021, 02:54 PM
  2. [SOLVED] separating only the doubles at the values of distances of 1,2,3,4,5
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2018, 03:32 PM
  3. Separating Unique Values & Duplicate Values
    By GeminiDGR8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2016, 12:39 PM
  4. [SOLVED] Separating only certain values from cells
    By Beatnik10 in forum Excel General
    Replies: 7
    Last Post: 03-23-2016, 02:15 PM
  5. Separating cell values
    By Emmerly in forum Excel General
    Replies: 3
    Last Post: 11-22-2011, 08:39 AM
  6. Separating values.
    By johnlennon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-29-2008, 02:55 PM
  7. separating cell values
    By saziz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2008, 04:27 PM

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