+ Reply to Thread
Results 1 to 15 of 15

Transposing rows with common entries into several rows

  1. #1
    Registered User
    Join Date
    03-03-2022
    Location
    Perth, Western Australia
    MS-Off Ver
    2007
    Posts
    13

    Transposing rows with common entries into several rows

    Hello,

    I am still trying to familiarise myself with Arrays, Transpose, VLOOKUP etc.... and I am trying to write a VBA micro to transpose Rows with common entries into several column.

    Also, if someone has any recommendation about sites or books that deal specifically with arrays, index etc.. that would be much appreciated.



    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Transposing rows with common entries into several rows

    try
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-03-2022
    Location
    Perth, Western Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Transposing rows with common entries into several rows

    Thank you!

    I works really well. I did not realised until now that I had so many missing entry.

    Just one question. What would happen if there were a duplicated entry? I.e. two type 43 for the same "allocated_to_product_id"
    Would the last entry simply overwrite the previous one?

    I just checked and it does just that. Would it be any easy way to check for duplicated entry first?

    Regards,
    Didier

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Transposing rows with common entries into several rows

    What do you want to do when duplicate happens?

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Transposing rows with common entries into several rows

    Another Option...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Registered User
    Join Date
    03-03-2022
    Location
    Perth, Western Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Transposing rows with common entries into several rows

    Best would be to have a single line entry for the duplicates so the can easily be identified, investigated and corrected.

    Something like that.

    Doc4.jpg

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Transposing rows with common entries into several rows

    Make it simple
    Change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-03-2022
    Location
    Perth, Western Australia
    MS-Off Ver
    2007
    Posts
    13

    Re: Transposing rows with common entries into several rows

    That works great. Thank you.

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Transposing rows with common entries into several rows

    Amended...
    Please Login or Register  to view this content.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Transposing rows with common entries into several rows

    Accessing Application.Match method 15000 x 2 times.... joking.

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Transposing rows with common entries into several rows

    Quote Originally Posted by jindon View Post
    Accessing Application.Match method 15000 x 2 times.... joking.
    Untitled.png

    How did I miss that...Correct you are jindon...

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Transposing rows with common entries into several rows

    @ jindon...
    Is this more efficient?
    Please Login or Register  to view this content.
    Last edited by sintek; 03-22-2022 at 05:40 AM.

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Transposing rows with common entries into several rows

    What is the "Efficient" for you?

    Writing like spaghetti code to reduce the space? if so, it may be...

  14. #14
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Transposing rows with common entries into several rows

    Story of your life...always insult...Well if it makes you feel better...No skin off my back...

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Transposing rows with common entries into several rows

    Insult?

    You always take my important message like that even you asked...

+ 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. Replies: 7
    Last Post: 06-18-2020, 02:09 PM
  2. Replies: 1
    Last Post: 07-20-2017, 01:52 PM
  3. Replies: 2
    Last Post: 07-20-2017, 11:50 AM
  4. Transposing columns to rows (while skipping rows)
    By mctighe in forum Excel General
    Replies: 0
    Last Post: 02-09-2015, 03:19 PM
  5. Replies: 1
    Last Post: 06-04-2013, 12:02 AM
  6. [SOLVED] Need help badly with transposing 3 rows of patterned data into seperate rows
    By unnyb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-03-2013, 02:42 PM
  7. Replies: 1
    Last Post: 03-18-2009, 04:18 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