Need help in ignoring excel/pivot counting Blank Cells..

vasanthkumar1979

New Member
Joined
Aug 10, 2022
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
Dear Experts,

I need help in the attached excel sheet. I have a huge data where I need to filter particular status. I had put IF condition with "" value (=IF(E2="Open","1",IF(E2="WIP","1","")).

When I check the count, the total counts the blank cells too. The same issue happens in Pivot.

Any suggestion on how to get rid of blank cell?

Test File.xlsx
ABCDEFGHIJKL
1DatePriorityIssue DescriptionOwnershipStatusAging
208-Aug-22HighIssue No.1AOpen1
308-Aug-22HighIssue No.2BClose 
408-Aug-22HighIssue No.3CWIP1
508-Aug-22HighIssue No.4AOpen1Formula usedIF(E2="Open","1",IF(E2="WIP","1",""))
608-Aug-22HighIssue No.5BClose 
708-Aug-22HighIssue No.6CClose CountA=9
808-Aug-22HighIssue No.7AOpen1
908-Aug-22HighIssue No.8BClose I understand "" value will be counted. Is there any way the blank cell shoul not be counted while doing CountA?
1008-Aug-22HighIssue No.9CWIP1
119
12
13
14
15
16Count of AgingColumn Labels
17Row LabelsABCGrand Total
18Issue No.111
19Issue No.211
20Issue No.311
21Issue No.411
22Issue No.511
23Issue No.611
24Issue No.711
25Issue No.811
26Issue No.911
27Grand Total3339
28
29
Consolidated
Cell Formulas
RangeFormula
F2:F10F2=IF(E2="Open","1",IF(E2="WIP","1",""))
F11F11=COUNTA(F2:F10)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Instead of using a COUNTA function, why not use COUNTIF instead, counting the ones equal to "1"?
Excel Formula:
=COUNTIF(F2:F10,"1")
 
Upvote 0
Hello Joe,

The idea is to summarize in the Pivot Table. I just showed Count to show its counting the blanks too. When I make the Pivot Table, the blanks also will be counted. In order to get rid of that, I have to go to blank cells and delete unseen "" which will be an additional task when the data is huge.
 
Upvote 0
Can you change your initial formula to this?
Excel Formula:
=IF(OR(E2="Open",E2="WIP"),1,0)

And then instead of trying to do a COUNT in your Pivot table, try doing a SUM instead?
 
Upvote 0
That doesn't help too. When I pull it to a pivot table. Row Labels will be "Issue Description", Column labels will be "Ownership" and Values will be "Aging".

Expected result should be 5 (Total), but Pivot shows 9 because it counts 0 as a value. Cell has to be empty to return the total value as 5.
 
Upvote 0
That doesn't help too. When I pull it to a pivot table. Row Labels will be "Issue Description", Column labels will be "Ownership" and Values will be "Aging".

Expected result should be 5 (Total), but Pivot shows 9 because it counts 0 as a value. Cell has to be empty to return the total value as 5.
I said to choose the "SUM" option instead of the "COUNT" option in your Pivot Table.
See: Sum values in a PivotTable

If that is not what you want, show us an example of your original data, and your desired output.
I think things may be confusing because of all the "extra" stuff you added in there for demonstration purposes, but don't really want there.
It is difficult to differentiate the two with what you really have and what you really want, without any of the "extra" stuff.
 
Upvote 0
Okay! Here is what I am expecting! Left is my Raw data and Right is what I am expecting in Pivot table.

Test File.xlsx
ABCDEFGHIJK
1Raw DataExpected Result in Pivot
2DatePriorityIssue DescriptionOwnershipStatusAgingIssue DescriptionLine ItemsStatus
308-Aug-22HighIssue No.1AOpen1Issue No.111
408-Aug-22HighIssue No.2BClose0Issue No.21
508-Aug-22HighIssue No.3CWIP1Issue No.311
608-Aug-22HighIssue No.4AOpen1Issue No.411
708-Aug-22HighIssue No.5BClose0Issue No.51
808-Aug-22HighIssue No.6CClose0Issue No.61
908-Aug-22HighIssue No.7AOpen1Issue No.711
1008-Aug-22HighIssue No.8BClose0Issue No.81
1108-Aug-22HighIssue No.9CWIP1Issue No.911
12Grand Total95
13
Consolidated
Cell Formulas
RangeFormula
F3:F11F3=IF(OR(E3="Open",E3="WIP"),1,0)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2:F1048576Cell Value="Blank"textNO
 
Upvote 0
That does not look like a very robust example.
Each issue has exactly one line item, so your Pivot table has the exact same number of rows as your original table.
If this is actually how things actually are, the Pivot table is pretty redundant and totally unnecessary.

Can you show a better example, that is more indicative of the different situations that may actually experience?
Show some of the more complex scenarios that you may have?
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top