ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Remove subtotal where only one item (https://www.excelbanter.com/excel-programming/324259-remove-subtotal-where-only-one-item.html)

Biff[_2_]

Remove subtotal where only one item
 
Is there a simple way to format a pivot table such that when there is
only one item to subtotal, the subtotaling is deactivated? In other
words, given a specific field, I _do_ want subtotals to show if there
is more than one item and _do not_ want subtotals to show if there is
only one item


color size quantity
blue 1 10
blue 2 15
blue total 25
red 1 13
red total 13 <- not necessary for this case, can it be
removed?

Thanks,
Dave


Debra Dalgleish

Remove subtotal where only one item
 
You could hide the subtotals with conditional formatting:

In the pivot table, enable Selection
Select the field's subtotals
Choose FormatConditional Formatting
From the first dropdown, choose Formula is
In the formula box, type a formula that refers to the cell
above the active cell, e.g.: =$A8<""
Click the Format button, and select a font colour to match
the cell background
Click OK, click OK

Biff wrote:
Is there a simple way to format a pivot table such that when there is
only one item to subtotal, the subtotaling is deactivated? In other
words, given a specific field, I _do_ want subtotals to show if there
is more than one item and _do not_ want subtotals to show if there is
only one item


color size quantity
blue 1 10
blue 2 15
blue total 25
red 1 13
red total 13 <- not necessary for this case, can it be
removed?

Thanks,
Dave



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Biff[_2_]

Remove subtotal where only one item
 
Debra,

Thanks for the advise. Hiding the subtotals is a good compromise, but
I wish there were an option to enable "smart subtotals."

Thanks again,
Dave



All times are GMT +1. The time now is 07:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com