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 =3D 0 Or c =3D "" Or c =3D Null Then
i =3D i + 1
Else
End If
Next c
Range("G1").Value =3D 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=E5n the "Databodyrange" ? It has to be dynamic as the pivot table
changes alot. (number of columns and rows differs from time to time)
Bookmarks