+ Reply to Thread
Results 1 to 4 of 4

Group by column and transpose rows as columns

  1. #1
    Registered User
    Join Date
    05-03-2020
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 2019
    Posts
    3

    Group by column and transpose rows as columns

    I would like to Group by column and transpose rows as columns. Some users will have 4 columns, others will have up to 20.

    WHAT I HAVE:
    UserID Plan StartDate CancelDate
    1 A 2019-05-24 2019-06-20
    1 B 2019-06-20 0000-00-00
    2 A 2019-12-19 0000-00-00
    2 B 2020-01-30 0000-00-00
    3 C 2019-03-06 0000-00-00
    3 C 2019-03-06 2019-11-28

    WHAT I WANT:
    UserID Plan StartDate CancelDate Plan StartDate CancelDate
    1 A 2019-05-24 2019-06-20 B 2019-06-20 0000-00-00
    2 A 2019-12-19 0000-00-00 B 2020-01-30 0000-00-00
    3 C 2019-03-06 0000-00-00 C 2019-03-06 2019-11-28
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Group by column and transpose rows as columns

    Hi cartoondoor ,
    Please see attached.

    Columns F&L are helpers for the 2 grey tables retrieving the user ID# (1,2,3).

    The 1st table searches for the first duplicated number and returning data accordingly with the formula in G3:

    =INDEX(A$1:A$8,MOD(SMALL(IF($F$3:$F$8<>"",$F$3:$F$8*1000+ROW(A$3:A$8)),ROWS(E$3:E3)),1000))


    The 2nd table searches for the second duplicated number and returning data accordingly with the formula in M3:
    =INDEX(A$1:A$8,MOD(SMALL(IF($L$3:$L$8<>"",$L$3:$L$8*1000+ROW(A$3:A$8)),ROWS(E$3:E3)),1000))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-03-2020
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 2019
    Posts
    3

    Re: Group by column and transpose rows as columns

    Thanks, Belinda Best solution I've seen yet.

  4. #4
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Group by column and transpose rows as columns

    You're welcome.

    If your problem is solved, please go to Thread Tools and select Mark This Thread Solved

+ 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] transpose/convert range of rows and columns to one column, removing blanks
    By loganpmgoa in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-13-2019, 01:49 PM
  2. Transpose column to rows based on values in two other columns
    By jacobburdis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-11-2017, 01:48 PM
  3. [SOLVED] Need help on macro to transpose rows to columns while repeating certain column N times
    By cmleong in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-17-2016, 11:07 PM
  4. [SOLVED] Transpose Columns to Rows While Repeating Data in First Column to Each Row
    By leoxanigm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-29-2015, 06:54 AM
  5. [SOLVED] How to transpose / convert columns and rows into single column?
    By chief_abound in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-09-2015, 08:04 PM
  6. Transpose a set of 6 rows to one column and repeat for next columns
    By labamba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-14-2013, 05:06 AM
  7. [SOLVED] How to transpose one column into multiple rows and columns?
    By Raoul Gonzo in forum Excel General
    Replies: 4
    Last Post: 01-15-2013, 11:00 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