+ Reply to Thread
Results 1 to 7 of 7

Formula to split data from one cell into multiple rows

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Romania
    MS-Off Ver
    Excel 2016
    Posts
    54

    Formula to split data from one cell into multiple rows

    Hello everybody,

    I need help transforming some data. I'm having issues splitting data from one column into multiple rows, while repeating data from the other columns.
    For better understanding, I have attached an example.
    This needs to be accomplished by formula and not VBA.

    Regards,
    tchock
    Attached Files Attached Files

  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 2403
    Posts
    44,053

    Re: Formula to split data from one cell into multiple rows

    A6, an array formula (and a bit of a monster...):
    =IFERROR(TRIM(MID(SUBSTITUTE(";"&INDEX(data!$C$2:$C$5,MATCH(1,(data!$A$2:$A$5=output!B6)*(data!$B$2:$B$5=output!C6),0)),";",REPT(" ",125)),125*SUMPRODUCT(IF(CONCATENATE($B$6:$B6,$C$6:$C6)=$B6&$C6,1,0)),125)),"")

    B6, copied across and down:
    =IFERROR(INDEX(data!A$2:A$5,MATCH(0,INDEX(--(COUNTIF(B$5:B5,data!A$2:A$5)=data!$D$2:$D$5),0),0)),"")
    Attached Files Attached Files
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-21-2018
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula to split data from one cell into multiple rows

    Hi,

    Do you want to split the product id?

    You can use the left and right functions

    =LEFT(C2,SEARCH(";",C2,1)-1) ---> to get the first product id

    =RIGHT(C2,LEN(C2)-SEARCH(";",C2,1)) ---> to extract the balance

    just keep repeating it. (i hope i can attach your spreadsheet but i dont know how.)

    I have tried this one for you.

    This is what i normally do. But if there are other suggestions from other user's that are more convenient and faster, i'll appreciate it too.

    Hope this help.

    Thank you.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-21-2018
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    5

    Re: Formula to split data from one cell into multiple rows

    Wow, this is really monster.

    I need to check this out.

    I'm using the manual trimming.

  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 2403
    Posts
    44,053

    Re: Formula to split data from one cell into multiple rows

    I forgot to add...

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...

  6. #6
    Registered User
    Join Date
    01-23-2014
    Location
    Romania
    MS-Off Ver
    Excel 2016
    Posts
    54

    Re: Formula to split data from one cell into multiple rows

    This is perfect!
    You're a superstar! :D
    Thanks a lot!!!

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

    Re: Formula to split data from one cell into multiple rows

    You're welcome and thanks for the rep.

+ 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] Macro to split cell with multiple rows into multiple cells
    By dobracik in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-23-2017, 10:02 AM
  2. [SOLVED] Split one cell into multiple rows
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-16-2015, 07:39 AM
  3. Excel VBA - Split rows of data into multiple workbooks based on cell value
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2015, 03:35 PM
  4. split cell data into multiple rows and keep associated data
    By aeb430 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-04-2015, 06:49 PM
  5. [SOLVED] Split a cell of data into multiple rows
    By otterandrews in forum Excel General
    Replies: 4
    Last Post: 03-24-2013, 11:59 PM
  6. Row split in to multiple rows based on cell data
    By bosuck in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-08-2011, 05:30 PM
  7. Split cell data into multiple new rows and copy other column values
    By jooga in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-01-2010, 02:30 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