Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Not display rows where grand total is 0

I have pivottables that have rows where the grand total is 0. I want to
hide these rows automatically but I can't figure out how to filter them out.
I would even settle for sorting on grand total but that one alludes me too.

Any help will be appreciated!

Walter
--
WAC
  #2   Report Post  
Posted to microsoft.public.excel.misc
Udo Udo is offline
external usenet poster
 
Posts: 48
Default Not display rows where grand total is 0

Suggestion:
make sure that you have on the left side of the pivot table at least
two columns space, say A and B. In B you calculate the grand totals
(e.g =sum(C6:s6)). In A you enter the formula
=if(B6=0;"hide";0)
Then you write a pice of code:
sub HideZeroTotal()
Dim rngArea As Range

Application.ScreenUpdating = False
ActiveSheet.Range("a6:a300").Select
Selection.EntireRow.Hidden = False
ActiveSheet.Calculate
Selection.SpecialCells(xlCellTypeFormulas, xlTextValues).Select
For Each rngArea In Selection
rngArea.EntireRow.Hidden = True
Next
ActiveSheet.Range("n2").Select
Application.ScreenUpdating = True

end sub

Here it is assumed, that the area of interest is between rows 6 and
300. Whenever you run the code, the lines where grand total = 0 will
be hidden.

Good luck
Udo

wacNTN schrieb:

I have pivottables that have rows where the grand total is 0. I want to
hide these rows automatically but I can't figure out how to filter them out.
I would even settle for sorting on grand total but that one alludes me too.

Any help will be appreciated!

Walter
--
WAC


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automate display/ hide rows in excel based on yes/no check box schraplau Excel Discussion (Misc queries) 0 April 25th 06 07:48 PM
Need 2 rows to display X axis data points for a line graph SusanG Charts and Charting in Excel 1 March 8th 06 06:34 PM
formula to use when number of rows changes dynamically confused Excel Worksheet Functions 3 August 17th 05 03:55 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Display selected rows from one worksheet to another Brian Excel Worksheet Functions 5 October 29th 04 12:26 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"