Pivot Table count- do not count cells with formula returning ""

machumpion

Registered User.
Local time
Today, 07:49
Joined
May 26, 2016
Messages
93
I have a table with a column ("A") that returns either a string or "" depending on whether another column is empty or not.

I want to create a pivot table that counts the non "" cells in column A but the P table also counts the "" cells as well.

Is there a way to get the pivot table to only count cells that are not ""?
 
Excel see the formula result null strings as text strings and still counts them.

You can add another column with a formula like:

=IF(A2="",0,1)

Then Count or Sum that column in your pivot table
 
The answer above will work fine. Just to add a little more, this is an interesting article to keep handy.
http://www.techonthenet.com/excel/pivottbls/empty_cells2010.php

If using Excel Automation to read external data and create canned Excel outputs,
then the use of Named Ranges in MS Query can allow the formula to be added in the transfer process.
This was useful in an older copy of Excel. Have not seen it discussed anywhere else. Chances are that it would still work in later versions of excel:
http://www.mrexcel.com/forum/excel-questions/297669-pivot-table-count-exclude-empty-strings.html
 

Users who are viewing this thread

Back
Top Bottom