+ Reply to Thread
Results 1 to 10 of 10

Pivot table using data that has run onto a second sheet

  1. #1
    Registered User
    Join Date
    09-14-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    8

    Pivot table using data that has run onto a second sheet

    Hello,

    I'm using Excel 2013. I have a sheet of data (Sheet1) with columns A to K containing data. Each month I add more rows to Sheet1 (the columns remain the same).

    I have a pivot table with data source 'Sheet1'!$A:$K which I refresh each month after additional data rows have been added into Sheet1.

    I have now filled all the available rows in Sheet 1 but need to continue adding rows to the data which feeds into the pivot table. I can either continue adding rows (with the same column headers) on Sheet2 (preferably), or on Sheet1 columns M:W.

    How can I add these additional rows of data into the same pivot table data range? Ideally without using VB.

    Thanks in advance.

    K

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Pivot table using data that has run onto a second sheet

    change your source range to Excel Table, recreate Pivot Table where you want
    after that you can add more rows in source and refresh PivotTable. your data will be visible in PT automatically

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Pivot table using data that has run onto a second sheet

    Alternately you can use Pivot Table wizard to consolidate multiple ranges.

    Assuming structure of the data remains same...

    ALT + D then P to launch PivotTable wizard.

    Select "Multiple consolidation ranges". Hit Next.

    Unless you need multiple page filter, just have it set to "Create a single page field for me". Hit Next.

    Select A:K in Sheet1 and add. Then select same range in Sheet2 and add. Hit Next. (or convert both to table and add tables).

    Create pivot where you want it.

    Now, if you add to sheet2 data, when you refresh pivot, it will be there.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Registered User
    Join Date
    09-14-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    8

    Re: Pivot table using data that has run onto a second sheet

    Quote Originally Posted by CK76 View Post
    Alternately you can use Pivot Table wizard to consolidate multiple ranges.

    Assuming structure of the data remains same...

    ALT + D then P to launch PivotTable wizard.

    Select "Multiple consolidation ranges". Hit Next.

    Unless you need multiple page filter, just have it set to "Create a single page field for me". Hit Next.

    Select A:K in Sheet1 and add. Then select same range in Sheet2 and add. Hit Next. (or convert both to table and add tables).

    Create pivot where you want it.

    Now, if you add to sheet2 data, when you refresh pivot, it will be there.
    Thanks, however when I create the pivot in this way, on the Pivot Table Fields box to the right of the page, in the "Choose fields to add to report" section, it just shows "Row", "Column", "Value", "Page1", whereas before, this section showed all the headers of columns A:K so that I could drag these and create a pivot as appropriate. I can't see how I can replicate the same pivot table with just "Row", "Column", "Value", "Page1" to pick from.

    Help appreciated. Thanks

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Pivot table using data that has run onto a second sheet

    You can also leverage MS Query in conjunction with PivotTable Wizard to Union two tables. Or if you have access to it, PowerQuery can do the same without need for PivotWizard.

    Alternately, you can create list of unique key in 3rd table and use data relationship and use that to create pivot.

    If you can upload a sample file. I can help you create steps for one of above that suites your need.

  6. #6
    Registered User
    Join Date
    09-14-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    8

    Re: Pivot table using data that has run onto a second sheet

    Quote Originally Posted by CK76 View Post
    If you can upload a sample file. I can help you create steps for one of above that suites your need.
    Please see attached containing 2 sheets of data and a pivot table which pulls from Data1 tab. The data I'm actually using has utilised all rows on Data1 tab, hence the need to run onto Data2 tab.

    Thanks
    Attached Files Attached Files

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Pivot table using data that has run onto a second sheet

    PivotTable from both tables Data1 & Data2 via PowerQuery (PowerQuery - free add-in for Excel 2013 from MS site)

    is that what you want?

  8. #8
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Pivot table using data that has run onto a second sheet

    @ktharmer

    sandy666's method is recommended and preferred.

    If for some reason or another you cannot use PQ. Then your next best option is to use MS Query.

    However, MS query has issue with data stored on same workbook, you will need data workbook separate from Pivot Workbook.
    As well, there's no way to make folder path dynamic without bit of VBA to my knowledge.

    If you need further help on MS Query method, let me know.

  9. #9
    Registered User
    Join Date
    09-14-2016
    Location
    England
    MS-Off Ver
    2013
    Posts
    8

    Re: Pivot table using data that has run onto a second sheet

    Thanks, all, for your suggestions. Unfortunately I cannot install PQ on my work laptop.

    It's looking like VB is the best alternative. Do you have any code which would work? (assuming I am a novice with VB...)

    Continued thanks!

  10. #10
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Pivot table using data that has run onto a second sheet

    Sure. Try this. But don't know how efficient it will be with your actual data. As it combines both sheets in memory using array object.
    Then loads PivotCache using the array.

    You will need to add "Microsoft ActiveX Data Objects Recordset x.x Library" as reference in Project.

    Function to combine array is from stackoverflow I believe, but can't remember exactly where I got it from (it's been couple of years).
    Please Login or Register  to view this content.
    Note: This will create pivot table in a new sheet with no fields added in with no formatting. You'll need to add them.
    0.JPG

    Test and let me know how it works out. This is just a demo, so I haven't put in routine to delete pivot's when new one is created. So manually delete generated pivot before you run the code for the second time for now.
    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. How do I pull pivot table data from one sheet to another?
    By danbroome in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-10-2016, 07:39 PM
  2. Pivot Table, select data and put into new sheet.
    By ratdogexcel in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 12-03-2013, 11:52 AM
  3. Need to Copy the Pivot table Data in the same/different Sheet using VBA
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-05-2013, 03:33 AM
  4. PProtect a sheet containing a pivot table but allow table to refresh data?
    By ThomasCarter in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-22-2013, 05:46 AM
  5. Replies: 4
    Last Post: 11-18-2012, 07:08 AM
  6. raw data sheet for pivot table
    By g48dd in forum Excel General
    Replies: 3
    Last Post: 06-22-2009, 11:24 PM
  7. Excel 2007 : Getting Pivot Table data in another sheet.
    By acsishere in forum Excel General
    Replies: 5
    Last Post: 05-28-2009, 05:20 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