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
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
Last edited by lightryko; 11-03-2022 at 05:34 AM.
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.
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.
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.
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))
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))))))
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
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.
Here is an improved version of my previous formula:
Result is the same, but this formula works a bit more efficientlyFormula:Please Login or Register to view this content.
Last edited by HansDouwe; 11-03-2022 at 06:44 AM.
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
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!
Glad to have helped.
You might want to add your 365 release number to your forum profile - it will be a number like 2nnn.
you are welcome
https://learn.microsoft.com/en-us/power-query/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks