LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Count nullstrings in pivot table (databodyrange)

Hello

I have nullstrings in a pivot table. I can count them with this code
and place the result in cell G1:
Sub count_nulls()

Dim c as Range
Dim i As Integer

Range("A3").Select
ActiveCell.PivotTable.DataBodyRange.Select
For Each c In Selection
If c = 0 Or c = "" Or c = Null Then
i = i + 1
Else
End If
Next c

Range("G1").Value = i
Range("G1").Select

End Sub

I now wish to specify in more detail what range within the pivot data
table the counting should take place in. Certain columns and rows
should not be included. How do I exclude certain cells och ranges?
från the "Databodyrange" ? It has to be dynamic as the pivot table
changes alot. (number of columns and rows differs from time to time)

 
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
Count(s) in Pivot Table Reno Excel Discussion (Misc queries) 4 January 13th 10 04:18 PM
Pivot Table Count Rajula Luke - This is my display name Excel Discussion (Misc queries) 1 October 12th 09 02:36 PM
Pivot Table Sum vs Count Dave Shultz Excel Discussion (Misc queries) 0 March 12th 07 07:25 PM
Pivot Table - Count If denise Excel Discussion (Misc queries) 2 February 2nd 07 09:31 PM
Pivot Table Count JohnV Excel Discussion (Misc queries) 3 November 16th 06 12:01 AM


All times are GMT +1. The time now is 08:27 AM.

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"