+ Reply to Thread
Results 1 to 7 of 7

How to transpose duplicate rows to columns

  1. #1
    Registered User
    Join Date
    11-16-2017
    Location
    Groningen
    MS-Off Ver
    2010
    Posts
    3

    How to transpose duplicate rows to columns

    Hi!

    As an Excel newby, I need your help.

    I would like to transpose duplicate rows to columns. I have tried multiple options from this website and others, but they don't remove the transponed rows.

    Example (also in Excel sheet):
    number1; 30
    number1; 40
    number2; 40
    number2; 40
    number2; 50
    number3; 80
    number3; 50

    Can this be transposed to:

    number1; 30; 40
    number2; 40; 40; 50
    number3; 80; 50

    Thanks a lot in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to transpose duplicate rows to columns

    The last date entry is an issue but, for the rest - try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    11-16-2017
    Location
    Groningen
    MS-Off Ver
    2010
    Posts
    3

    Re: How to transpose duplicate rows to columns

    Works amazing for my dummy file!

    But for my real file, I would like to use the VBA for 1580 rows and this doesn't work.
    I think the problems is in the T_Line, could you help me with that?

    Exit Sub
    T_Line: Q(s, c + 1) = P(r, 2): Q(s, c + 2) = P(r, 3)
    Q(s, c + 3) = P(r, 4): Q(s, c + 4) = P(r, 5): Q(s, c + 5) = P(r, 6)
    c = c + 5: Return
    End Sub

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

    Re: How to transpose duplicate rows to columns

    Try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-16-2017
    Location
    Groningen
    MS-Off Ver
    2010
    Posts
    3

    Re: How to transpose duplicate rows to columns

    Thanks Jindon! Unfortunatly your VBA doesn't remove the former duplicate rows.

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

    Re: How to transpose duplicate rows to columns

    Missed one line
    Change
    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to transpose duplicate rows to columns

    The problem could be here:

    Please Login or Register  to view this content.
    Because, I'm only allowing enough room for seven header sets (actually 8).

    Try:

    Please Login or Register  to view this content.
    or, if you know how many rows can have the same number - put that in place of the red.


    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. transpose duplicate rows to columns
    By slabbbe in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-01-2021, 06:11 PM
  2. Replies: 1
    Last Post: 09-28-2017, 12:53 AM
  3. Replies: 7
    Last Post: 08-22-2016, 10:31 AM
  4. Transpose duplicate rows into columns
    By Ochenden in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2016, 03:44 PM
  5. [SOLVED] Transpose Duplicate rows into columns including blank cells
    By BJPhil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2014, 12:08 PM
  6. Transpose Duplicate Rows to Separate Columns
    By VEL in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-26-2012, 01:08 PM
  7. Mass transpose cells for duplicate rows
    By reliccross in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-28-2011, 12:46 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