+ Reply to Thread
Results 1 to 5 of 5

How do I tie a column to a pivot table?

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Florence, Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    5

    How do I tie a column to a pivot table?

    I ran across an Excel file that does something I need to do but the creator is no longer with the company and I can't find anyone that knows how they did this. I'm searching online but have not yet been able to find anything.

    In the attached file the "Weekly" worksheet contains a pivot table. Next to the table is a column labeled "Points". The "Points" column does not appear to be part of the pivot table (at least the PivotTable Tools option at the top disappears when you click in the column) but it expands and collapses with the table.

    I can't find an Excel option or any code that would account for this behavior. I need to duplicate this functionality for some post-calculated data that I need to display.

    Any help would be greatly appreciated.z_ExampleFile.xlsx

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: How do I tie a column to a pivot table?

    The 1st part of the formula is testing to see if certains cells contain data. if they do not, it returns a NULL value (empty cell)...

    =IF(($A6="")*AND($B6=""),"",SUM($Q6:$AA6))
    I would have done it slightly differently, but that works too...
    =IF(AND($A6="",$B6=""),"",SUM($Q6:$AA6))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-17-2013
    Location
    Florence, Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do I tie a column to a pivot table?

    Thank you for the reply.

    The column that contains that formula is for calculating if the Agent gets a point for that metric.

    However, I need to know what makes the "Points" column expand and collapse with the Pivot Table itself. The "Points" column doesn't appear to be part of the Pivot Table so how does one get the column to act as if it is.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: How do I tie a column to a pivot table?

    I just told you how it does that. If there is no value in A or B of that row, it shows nothing. it is not "expanding or collapsing", it is just showing - or not showing - a value depending on if those 2 cells contain data. They will contain data if the PT extends or shrinks.

    to show you what I mean, on a clear worksheet, enter this...
    A1 = 10
    B1 = 20
    C1 = if(and(A1="",B1=""),"",A1+B1

    Now, delete either 10 or 20 and see what happens
    Last edited by FDibbins; 05-22-2013 at 11:38 AM.

  5. #5
    Registered User
    Join Date
    05-17-2013
    Location
    Florence, Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How do I tie a column to a pivot table?

    So Sorry!!

    I found the problem. The pivot table list the Manager at the top and again at the bottom. However, the bottom adds the word "Totals" to the name. I had to strip that out and that is causing the problem with my column.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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