Exclude Zero Values From Pivot Table

ringmaker

Board Regular
Joined
Oct 26, 2003
Messages
75
Hello - I am trying to eliminate zero values from my pivot table. If I have two line items in my data that offset each other and net to zero, I would like to exclude them. They show up in the pivot table with a value of zero. Here is a simplified example of the data structure and resulting pivot. I would like Cat D to be elimated from the pivot. I am hesitant to use VBA to hide rows as this will also hide some the categories in the column fields. Thanks for your help.

<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;border-top: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: #B6DDE8;;">Data</td><td style="text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;background-color: #B6DDE8;;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;background-color: #B6DDE8;;"></td><td style="text-align: right;border-right: 1px solid black;border-left: 1px solid black;;"></td><td style="font-weight: bold;border-top: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: #B2A1C7;;">Pivot</td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;background-color: #B2A1C7;;"></td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;background-color: #B2A1C7;;"></td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: right;border-top: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;;"></td><td style="text-align: center;border-top: 1px solid black;;"></td><td style="text-align: right;;"></td><td style="text-align: right;border-top: 1px solid black;;"></td><td style="text-align: right;border-top: 1px solid black;;"></td><td style="text-align: right;border-top: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="font-weight: bold;;">Cat</td><td style="font-weight: bold;text-align: center;;">Date</td><td style="font-weight: bold;text-align: center;;">Amount</td><td style="font-weight: bold;text-align: right;;"></td><td style=";">Sum of Amount</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style=";">A</td><td style="text-align: center;;">04/20/11</td><td style="text-align: center;;">100 </td><td style="text-align: right;;"></td><td style=";">Cat</td><td style=";">Date</td><td style=";">Total</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style=";">B</td><td style="text-align: center;;">04/19/11</td><td style="text-align: center;;">200 </td><td style="text-align: right;;"></td><td style=";">A</td><td style="text-align: right;;">04/20/11</td><td style="text-align: right;;">100 </td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style=";">C</td><td style="text-align: center;;">04/18/11</td><td style="text-align: center;;">300 </td><td style="text-align: right;;"></td><td style=";">B</td><td style="text-align: right;;">04/19/11</td><td style="text-align: right;;">200 </td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style=";">C</td><td style="text-align: center;;">04/18/11</td><td style="text-align: center;;">400 </td><td style="text-align: right;;"></td><td style=";">C</td><td style="text-align: right;;">04/18/11</td><td style="text-align: right;;">700 </td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style=";">D</td><td style="text-align: center;;">04/17/11</td><td style="text-align: center;background-color: #FFFF00;;">500 </td><td style="text-align: right;;"></td><td style=";">D</td><td style="text-align: right;;">04/17/11</td><td style="text-align: right;background-color: #FFFF00;;">0 </td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style=";">D</td><td style="text-align: center;;">04/17/11</td><td style="text-align: center;background-color: #FFFF00;;">(500)</td><td style="text-align: right;;"></td><td style=";">E</td><td style="text-align: right;;">04/20/11</td><td style="text-align: right;;">1,300 </td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style=";">E</td><td style="text-align: center;;">04/20/11</td><td style="text-align: center;;">600 </td><td style="text-align: right;;"></td><td style=";">F</td><td style="text-align: right;;">04/20/11</td><td style="text-align: right;;">800 </td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style=";">E</td><td style="text-align: center;;">04/20/11</td><td style="text-align: center;;">700 </td><td style="text-align: right;;"></td><td style=";">Grand Total</td><td style="text-align: right;;"></td><td style="text-align: right;;">3,100 </td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style=";">F</td><td style="text-align: center;;">04/20/11</td><td style="text-align: center;;">800 </td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A1</th><td style="text-align:left">Data</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E1</th><td style="text-align:left">Pivot</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A3</th><td style="text-align:left">Cat</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B3</th><td style="text-align:left">Date</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C3</th><td style="text-align:left">Amount</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D3</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E3</th><td style="text-align:left">Sum of Amount</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F3</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G3</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A4</th><td style="text-align:left">A</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B4</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C4</th><td style="text-align:left">100</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D4</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E4</th><td style="text-align:left">Cat</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F4</th><td style="text-align:left">Date</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G4</th><td style="text-align:left">Total</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A5</th><td style="text-align:left">B</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B5</th><td style="text-align:left">40652</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C5</th><td style="text-align:left">200</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D5</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E5</th><td style="text-align:left">A</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F5</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G5</th><td style="text-align:left">100</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A6</th><td style="text-align:left">C</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B6</th><td style="text-align:left">40651</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C6</th><td style="text-align:left">300</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D6</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E6</th><td style="text-align:left">B</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F6</th><td style="text-align:left">40652</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G6</th><td style="text-align:left">200</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A7</th><td style="text-align:left">C</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B7</th><td style="text-align:left">40651</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C7</th><td style="text-align:left">400</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D7</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E7</th><td style="text-align:left">C</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F7</th><td style="text-align:left">40651</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G7</th><td style="text-align:left">700</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A8</th><td style="text-align:left">D</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B8</th><td style="text-align:left">40650</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C8</th><td style="text-align:left">500</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E8</th><td style="text-align:left">D</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F8</th><td style="text-align:left">40650</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G8</th><td style="text-align:left">0</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A9</th><td style="text-align:left">D</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B9</th><td style="text-align:left">40650</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C9</th><td style="text-align:left">-500</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D9</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E9</th><td style="text-align:left">E</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F9</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G9</th><td style="text-align:left">1300</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A10</th><td style="text-align:left">E</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B10</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C10</th><td style="text-align:left">600</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D10</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E10</th><td style="text-align:left">F</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F10</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G10</th><td style="text-align:left">800</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A11</th><td style="text-align:left">E</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B11</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C11</th><td style="text-align:left">700</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D11</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E11</th><td style="text-align:left">Grand Total</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F11</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G11</th><td style="text-align:left">3100</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A12</th><td style="text-align:left">F</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B12</th><td style="text-align:left">40653</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C12</th><td style="text-align:left">800</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D12</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E12</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F12</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G12</th><td style="text-align:left"></td></tr></tbody></table></td></tr></table><br />
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,574
Messages
6,179,629
Members
452,933
Latest member
patv

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