Pivot Table help

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Pivot Table help

  1. #1
    New Member
    Join Date
    Apr 2015
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Pivot Table help

     
    Hi all,

    I need help with taking data from a pivot table and generating a data table, I think a macro or VBA would be the best bet.
    For example:

    This is my Pivot table (sheet 2):

    Row labels Sum of invoices Sum of invoices not valid Sum of valid invoices Sum not submitted Sum of total submitted Sum of % submitted
    Blue 10 1 9 3 6 67%
    Pink 1 0 1 0 1 100%
    White 5 0 5 2 3 60%
    Grand total 16 1 15 5 10 67%


    In another sheet (sheet 1) I want it to create a table like this. the table should label all rows and columns and populate the correct data from that pivot table

    # of invoices # Valid # submitted % submitted
    White
    Blue
    Pink
    Totals

    Can someone help me with this? That would be great, thanks

  2. #2
    New Member
    Join Date
    Apr 2015
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Pivot Table help

    Can anybody help? or at least help me in where I should get started

  3. #3
    Board Regular Darren Bartrup's Avatar
    Join Date
    Mar 2006
    Location
    Nottingham (UK)
    Posts
    1,253
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Pivot Table help

    Hi & welcome to the board.

    This will reference and extract data from a pivot table:
    Code:
    Sub PivotTables()
    
        Dim pt As PivotTable
        
        Set pt = ThisWorkbook.Worksheets("Sheet1").PivotTables("PivotTable1")
        
        With ThisWorkbook.Worksheets("Sheet2")
            .Select
            pt.PivotFields("Sum of calls outbound").DataRange.Copy
            .Range("A1").PasteSpecial xlPasteValuesAndNumberFormats
        End With
    
    
    End Sub
    Have a look at this site to see how to reference different parts of the pivot table: Referencing Pivot Table Ranges in VBA - Peltier Tech Blog
    Using Office 2003 & 2010,

    I'm 1 of the 10 people that don't understand binary. Guess that means the other 1001 do.

    No answer to your post?
    Get someone to read it - does it make sense or does it sound like gibberish?

  4. #4
    New Member
    Join Date
    Apr 2015
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Pivot Table help

      
    Thank you so much, I will look into referencing pivot tables

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com