+ Reply to Thread
Results 1 to 13 of 13

Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary selection

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary selection

    Hi Guys, looking for some hep with a pivot table which counts the results of cell formula

    I have a data set with a number of columns with nested IF formulae to provided a value if certain conditions are met, and if not met, return a NULL STRING, i.e =If(A1=1,1,"").

    I want to summarise (by counting) the results in a pivot table and then have the option to select the data values in the pivot table so that it returns the relevant data.

    The problem I am having is that the pivot table is counting Null string values too. So, logically, I changed settings to Sum the values and changed the Null string to a zero, i.e. =If(A1=1,1,0). This works to summarise the data in the pivot table, summing the total of all items which meet my criteria check. However, when i select the summed data values in the pivot table (to generate a new worksheet with the relevant data to be reviewed), it returns all the data items with either "1" or "0" in the cells, rather than just the ones which are summed and excluding the cells with "0" in.

    Is there a relatively simple way to get around this? So far, I can only think of copy and paste special all the formulae values (i.e. "0" & "1") in each cell and writing a macro to then CLEAR the cells containing the value "0" (or a null string depending on formulae used), which might not even work? This is beyond my skill level and not practical and the spreadsheet will be passed to very basic excel users to put their data into daily, so the formulas will need to remain to do the condition checks on new data each day.

    Does anyone have any help they can provide please or a post they can pass me to?

    Fingers crossed!

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Hello,

    set a filter on the pivot table to exclude the null strings (or the Zero values).

    see attached.

    Book2.xls
    Like a post? Click the star below it!

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    even if the cells were blank and not included in the count, double-clicking to produce a summary sheet would still include those rows
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    JosephP, not if the pivot table is filtered to exclude the rows.

    See attached file created in Excel 2003. There are 19 records. The pivot table shows only the records where the "report" field equals 1. This is set up with the page filter. Double click the pivot table summary field and a new sheet will open with just the fifteen valid results.

    pivot1.xls
    Last edited by npamcpp; 08-23-2012 at 07:30 AM.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    @npamcpp,
    true but as the asker said there were multiple columns with such formulae I didn't imagine that to be a practical solution. I may be wrong-it's happened ;-)

  6. #6
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Even multiple columns can be included in the page filter in Excel 2003. In later versions, there is even more control.

  7. #7
    Registered User
    Join Date
    08-23-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Hi guys, thanks for your responses.

    The filter option does not work because of the multiple colums I am summirising. If I filter blanks from one column, then that excludes then from the opportunity in the next column and so on.

    What is more interesting is JospehP comment that the blank cells would be included in the Summary data regardles, which I have just tested and found to be true!

    I guess this leads me to a deviation on my original question, can the summary data be changed to only return data relevant to the count in the pivot table and not return the blank data?

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    I know but the effect would be a cumulative filter which is unlikely to be what is desired I reckon

  9. #9
    Registered User
    Join Date
    08-23-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Yeh, cumulative filter = Bad for me. It is interesting to note that I have spent a long time trying to solve a problem which was nto going to help me anyway witht he summary tabs! This is starting to smell like a macro...

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Quote Originally Posted by Monkeyfud View Post
    I guess this leads me to a deviation on my original question, can the summary data be changed to only return data relevant to the count in the pivot table and not return the blank data?
    no. you would have to filter the resulting extract

  11. #11
    Registered User
    Join Date
    08-23-2012
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Ok guys, my appreciation for all your help. I am glad I posted else I would have been off on a goose chase for the rest of the day.

    As an aside JosephP, if I filter my summary tab, Is there an easy way to generate an animated 3d chart with flashing text which I could then share with my work pals?

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    yes but I suspect it may involve human sacrifice ;-)

  13. #13
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Stop Pivot Table Counting NULL Strings and exclude them from pivot data summary select

    Set up a helper column that contains the logic about the rows you want to display and returns a 1 or null string. Set up several helper columns to cater for several scenarios. Then use these helper columns in the page filter.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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