+ Reply to Thread
Results 1 to 5 of 5

Unpivot Columns without Power Query

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Unpivot Columns without Power Query

    Hello Excel Gurus,

    Without using Power Query, how do you unpivot columns of a particular table?

    The reason why i'm asking this is because I'd like to make it live and dynamic. So if there's additions to the table (in terms of more rows or columns), I'd like the formula to pick it up right away, rather than manually refreshing the power query.

    And take note too that there I only want the 'Province' to "duplicate" by the number of city names, and not by the number of city columns.

    For example, Notice that Ontario only has 3 cities, thus Ontario will duplicate 3 times.

    PS: I'm only looking for a formula. Not VBA or Power Query. For some reason I can't use macro because of 'sharing the workbook with tracked changes'.

    Unpivot Columns Without Power Query.png
    Attached Files Attached Files
    Last edited by dluhut; 09-28-2022 at 06:53 PM.

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Unpivot Columns without Power Query

    try

    =LET(z,Table1,r,ROWS(z),c,COLUMNS(z)-1,s,SEQUENCE(r*c,,0),p,INDEX(z,s/c+1,(MOD(s,c)+2)^{0,1}),FILTER(p,INDEX(p,,2)<>""))
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Unpivot Columns without Power Query

    Formulas
    Province
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    City
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Unpivot Columns without Power Query

    Solved and reps up to you both.

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,294

    Re: Unpivot Columns without Power Query

    Power Query
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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] Power Query Unpivot Workbook Tables with Date Column Headings
    By MarvinP in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-16-2021, 10:52 AM
  2. [SOLVED] Unpivot data in two columns in Power Query
    By Yaghoub61 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 08-13-2021, 12:12 AM
  3. Power query - unpivot data that has multiple headings
    By annaisakiwi in forum Excel General
    Replies: 11
    Last Post: 05-04-2020, 09:54 PM
  4. Custom Permutations Column in Power Query from two columns in the same Query
    By PaintPaddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2019, 02:48 PM
  5. Unpivot in Power Query keeping two columns
    By PennyK in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-10-2017, 06:27 AM
  6. Replies: 0
    Last Post: 10-25-2016, 02:59 AM
  7. [SOLVED] power query editor - unpivot?
    By pccamara in forum Excel General
    Replies: 5
    Last Post: 09-07-2016, 10:26 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