+ Reply to Thread
Results 1 to 9 of 9

Not Counting Grand Total from Pivot Table

  1. #1
    Registered User
    Join Date
    07-26-2013
    Location
    ca
    MS-Off Ver
    Excel 2007
    Posts
    28

    Cool Not Counting Grand Total from Pivot Table

    Ok I'm doing something for work and I am running into a problem.

    I am trying to count pivot tables, and my method may be a lot harder of getting my desired results, but its the only way I could figure out how to do what I needed.

    I have run into a problem where I need to not include the Grand Total of a pivot table into my count. entering "<>"&"grand total cell" does not work to exclude it from the count.

    I have split the same pivot table into two pivot tables because I needed to get the counts of the different categories.

    I can not edit or draw formulas from the original data at all, but my table under the "Result" tab should be able to update if more data is entered or taken out.

    Cells F5 and G5 are what need to be looked at in the Result tab.

    Everything else is just an example of what I'm doing and how I'm doing it.

    Thanks for the help!Counting Pivot Table.xlsx
    Last edited by baca25; 08-02-2013 at 12:41 AM.

  2. #2
    Registered User
    Join Date
    05-22-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Not Counting Grand Total from Pivot Table

    Dear Bro.

    Try This Formula

    =COUNTIFS('Pivot Category 2'!C:C,"<>"&"",'Pivot Category 2'!C:C,">=20")-1

  3. #3
    Registered User
    Join Date
    07-26-2013
    Location
    ca
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Not Counting Grand Total from Pivot Table

    sorry but its not that simple. If the data were updated for green or purple to be above $20, then it would count 1 more then it should because the grand total would be above $20. and it would have to be -2 and not -1.

  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
    52,936

    Re: Not Counting Grand Total from Pivot Table

    Hi and welcome to the forum

    see if the attached will give you what you need. It uses a combination of count/offset/indirect
    Attached Files Attached Files
    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

  5. #5
    Registered User
    Join Date
    07-26-2013
    Location
    ca
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Not Counting Grand Total from Pivot Table

    It does seem to be working.
    Thanks for the help, now I'm going to try to dissect the formula and make sense out of it.

  6. #6
    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
    52,936

    Re: Not Counting Grand Total from Pivot Table

    Sorry, in reviewing some of those formulas, I noticed a mistake...attached is the corrected version
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-26-2013
    Location
    ca
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Not Counting Grand Total from Pivot Table

    Ok thanks, its also important to know that the 20 you entered for the height should be a larger number for my work where there is a lot more data.

    I can't seem to wrap my head around most of the formula. But it works and thats mostly what matters.

    For instance I cant seem to understand ("'pivot Category "&$A5&"'!A4"). where is pivot category , what does "&$A5&" mean.

    You dont have to answer that, just some of what I'm struggling to understand in the formula.

  8. #8
    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
    52,936

    Re: Not Counting Grand Total from Pivot Table

    That is actually part of the INDIRECT() function, which I used so that you could copy the formula down (for other sheets) without needing to edit/fiddle with it to change sheet names...
    INDIRECT("'pivot Category "&$A4&"'!A4")

    Indirect() is a function that converts text to a reference that excel can use in a formula.
    "'pivot Category "&$A4&"'!A4" by itself will give 'pivot Category "1'!A4, which may look like a sheet/cell reference, but all excel sees is some text - indirect() converts that

    your sheet names are "Pivot Category 1", "Pivot Category 2" etc, and in your table, you have 1 (A4) and 2 (A5), so I used "'Pivot Category " and combined that with whatever was in cell A4 (in this case, 1), to give me the sheet name Pivot Category 1. But that is just the sheet name, we need to include a cell ref too, so thats where the &"'!A4" come in.

    so INDIRECT("'pivot Category "&$A4&"'!A4") says...

    use 'Pivot Category and combine it with 1 and then combine that with A4

    Hope that makes some sense to you?

  9. #9
    Registered User
    Join Date
    07-26-2013
    Location
    ca
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: Not Counting Grand Total from Pivot Table

    It all makes sense!
    Took me a while, but I deciphered it. haha
    Thanks again.

+ 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] Is it possible to have both Grand Total and Grand Average in a Pivot Table?
    By ANS in forum Excel Charting & Pivots
    Replies: 15
    Last Post: 10-16-2012, 05:15 AM
  2. [SOLVED] Pivot Table - % of Grand Total
    By montanaheather in forum Excel General
    Replies: 5
    Last Post: 09-14-2012, 09:50 AM
  3. [SOLVED] Pivot Table - Grand Total (Row)
    By stephboucher in forum Excel General
    Replies: 3
    Last Post: 04-25-2012, 09:01 AM
  4. Pivot Table - Sub Total & Grand Total Filter
    By ramki in forum Excel General
    Replies: 1
    Last Post: 08-07-2009, 11:40 PM
  5. [SOLVED] % of Running Total to Grand Total in Pivot Table
    By David in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2005, 04:05 PM

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