+ Reply to Thread
Results 1 to 5 of 5

Suppress zeros in a pivot table

  1. #1
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Suppress zeros in a pivot table

    Hello, with the data in the attached sheet, I create several different pivot tables that need show the count of the information in the columns M:DU. My issue is that the data is sent to me from a third party and the columns contain zeros that cause the counts to inflate. What I would like to be able to do is run a macro that will search out any zeros in M:DU and replace them with a blank cell. Unfortunately the number of rows increases with every monthly reporting cycle so the macro would need to be able to accommodate for that.


    Thanks for any help you can provide!
    Clayton
    Attached Files Attached Files
    Last edited by dcgrove; 10-13-2009 at 05:16 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Question of suppressing zeros in a pivot table

    Try this macro on your sheet:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 10-12-2009 at 07:00 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Question of suppressing zeros in a pivot table

    Here's an alternate version that only evaluates each column, as a whole, once, so it could be noticably faster on larger data sets.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: Question of suppressing zeros in a pivot table

    JBeaucaire this works great! the only problem is that it is removing the zeros from columns K:L as well. I need it to only remove the zeros from M:DU.

  5. #5
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Re: Question of suppressing zeros in a pivot table

    Nevermind, I thought I would try to interpret the code and see if I could fix it and I got it right on my first try!!!!

    I changed :
    Please Login or Register  to view this content.
    to:
    Please Login or Register  to view this content.
    Thanks for you help!

+ 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