+ Reply to Thread
Results 1 to 4 of 4

Trying to transform table where the rows become the columns and retain amounts

  1. #1
    Registered User
    Join Date
    08-01-2023
    Location
    US
    MS-Off Ver
    O365
    Posts
    2

    Trying to transform table where the rows become the columns and retain amounts

    Here is an example of the data and what I'm trying to do.
    No sure how to approach this issue. I've been able to do it before, but I had to create extra sheets with data and do a bunch of VLOOKUPs. Messy and time consuming.
    Thought there must be a better way.

    I attached a spreadsheet
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Trying to transform table where the rows become the columns and retain amounts

    One way, but you can't put these formulae into a Structured Table. You could, however, restructure your data and then Copy and Paste Special | Values and THEN insert a Structured Table.
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Trying to transform table where the rows become the columns and retain amounts

    One way:

    =LET(D,B5:D10,A,UNIQUE(INDEX(D,,1)),B,TRANSPOSE(UNIQUE(INDEX(D,,2))),VSTACK(HSTACK("Name",B),REDUCE(A,B,LAMBDA(y,z,HSTACK(y,MAP(A,LAMBDA(x,SUMIFS(INDEX(D,,3),INDEX(D,,1),x,INDEX(D,,2),z))))))))

    change the bit in RED to suit.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    08-01-2023
    Location
    US
    MS-Off Ver
    O365
    Posts
    2

    Re: Trying to transform table where the rows become the columns and retain amounts

    Wow. Thanks for the options. I'm really going to have to walk through these formulas to see what it's actually doing!

+ 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: 4
    Last Post: 07-04-2023, 10:36 AM
  2. [SOLVED] Data Transform - Moving some columns to rows while preserving others
    By jhg05003 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2022, 11:19 PM
  3. [SOLVED] Transform data in columns to rows
    By Zaid in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-15-2022, 12:51 AM
  4. Transform multiple rows from same record to one row with additional columns for variables
    By Coloradolady65 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-15-2021, 12:27 PM
  5. Replies: 7
    Last Post: 08-20-2019, 05:03 PM
  6. Transform Duplicate rows to columns
    By Ray789 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2011, 02:56 PM
  7. [SOLVED] single table with columns that have different amounts of rows
    By jleipart in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 02-28-2006, 03:45 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