+ Reply to Thread
Results 1 to 13 of 13

Generate Multiple Lines of Data from Summary Data Table

  1. #1
    Registered User
    Join Date
    11-03-2022
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 365
    Posts
    3

    Generate Multiple Lines of Data from Summary Data Table

    Hello,

    I'm new in Excel, is there a way/formula that i can do/generate that the data from the left table will come out as the right table?



    Captur3e.PNG
    Attached Files Attached Files
    Last edited by lightryko; 11-03-2022 at 05:34 AM.

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

    Re: Generate Multiple Lines of Data from Summary Data Table

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook. Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-03-2022
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 365
    Posts
    3

    Re: Generate Multiple Lines of Data from Summary Data Table

    Hello AliGW,

    Thank you for updating the title as I'm not sure with the terms to use haha.

    I am not sure what to include in the excel file as compared to the screenshot. Also, I have attached as requested.
    Last edited by lightryko; 11-03-2022 at 05:34 AM.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Generate Multiple Lines of Data from Summary Data Table

    Thanks. You are completely aware of what the title should be: I took the words from your opening post!

    I will have a look now.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Generate Multiple Lines of Data from Summary Data Table

    One way:

    =LET(t,TEXTSPLIT(TRIM(TEXTJOIN(" ",,REPT(A2:A5&" ",COUNT(A2:A5)))),," "),r,TOCOL(WRAPCOLS(TEXTSPLIT(TRIM(TEXTJOIN(" ",,REPT(B2:B5&" ",COUNT(A2:A5))))," "),COUNT(A2:A5))),CHOOSE({1,2},t,r))
    Attached Files Attached Files

  6. #6
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Generate Multiple Lines of Data from Summary Data Table

    Another way:

    =LET(a,A2:A5,b,B2:B5,x,ROWS(a),y,ROWS(b),HSTACK(MAKEARRAY(x*y,1,LAMBDA(m,n,INDEX(a,1+(m-1)/y))),MAKEARRAY(x*y,1,LAMBDA(m,n,INDEX(b,1+MOD(m-1,y))))))
    Attached Files Attached Files

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

    Cool Re: Generate Multiple Lines of Data from Summary Data Table

    with Power Query
    ID 1
    ID 2
    ID 1
    ID 2
    90041475
    469
    90041475
    469
    90041476
    476
    90041475
    476
    90041477
    461
    90041475
    461
    90041478
    330
    90041475
    330
    90041476
    469
    90041476
    476
    90041476
    461
    90041476
    330
    90041477
    469
    90041477
    476
    90041477
    461
    90041477
    330
    90041478
    469
    90041478
    476
    90041478
    461
    90041478
    330

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

    Re: Generate Multiple Lines of Data from Summary Data Table

    Any of the solutions any good to you?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Generate Multiple Lines of Data from Summary Data Table

    Here is an improved version of my previous formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Result is the same, but this formula works a bit more efficiently
    Attached Files Attached Files
    Last edited by HansDouwe; 11-03-2022 at 06:44 AM.

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Generate Multiple Lines of Data from Summary Data Table

    I used this one in G2 (for comparison with your existing table):

    =INDEX(A:A,INT((ROWS($1:1)-1)/(COUNTA($A:$A)-1))+2)

    and this one in H2:

    =INDEX(B:B,MOD(ROWS($1:1)-1,COUNTA($A:$A)-1)+2)

    then copied both down as required.

    Hope this helps.

    Pete

  11. #11
    Registered User
    Join Date
    11-03-2022
    Location
    Singapore
    MS-Off Ver
    Microsoft Office 365
    Posts
    3

    Re: Generate Multiple Lines of Data from Summary Data Table

    Thank you all for the replies and solutions.

    I have to thank Pete_UK as i do not have the Microsoft office insider program and don't know how to use the Power Query.

    Despite that, i will continue to study and learn what individual function/formula mean and how to use pratically!

    Really appreaciate all and will make the thread as Solved! Thank you all once again!

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Generate Multiple Lines of Data from Summary Data Table

    Glad to have helped.

    You might want to add your 365 release number to your forum profile - it will be a number like 2nnn.

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

    Re: Generate Multiple Lines of Data from Summary Data Table


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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