+ Reply to Thread
Results 1 to 5 of 5

Pivot table

  1. #1
    Registered User
    Join Date
    01-06-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    12

    Pivot table

    How would I pivot this table so that there was a column for industry/domestic/transport, column for year next to column for value.

    If I try to pivot myself it keeps saying "the range you picked can't be used as a data source. To create a PivotTable, you need to use a range that is organised as a lsit with labeled columsn". Is this because there is sub-columns?
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Pivot table

    Can you mock up a sample of what you want the output to look like. I suggest that you only provide source data for 3-8 records (show us) and then provide a manually mock up for those records.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-06-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    12

    Re: Pivot table

    As attached, would be ideal
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Pivot table

    This can be achieved with a few simple Power Query moves. Here is the Mcode resulting from those UI actions

    Please Login or Register  to view this content.
    See the attached file to follow this.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-06-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    12

    Re: Pivot table

    Quote Originally Posted by alansidman View Post
    This can be achieved with a few simple Power Query moves. Here is the Mcode resulting from those UI actions

    Please Login or Register  to view this content.
    See the attached file to follow this.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Great thanks for this, have been watching the videos to try get my head around.

+ 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] VBA create pivot table in excel 2010 defaulted to 2003 pivot table format
    By lynnsong986 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-15-2019, 02:05 PM
  2. Replies: 7
    Last Post: 02-27-2017, 07:41 AM
  3. Replies: 6
    Last Post: 01-24-2017, 06:56 PM
  4. Replies: 2
    Last Post: 09-04-2015, 02:47 AM
  5. Replies: 1
    Last Post: 07-29-2015, 05:19 PM
  6. Replies: 1
    Last Post: 07-29-2015, 05:15 PM
  7. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM

Tags for this Thread

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