mark rows displayed in pivot table

  • Thread starter Thread starter plake
  • Start date Start date
P

plake

Hi,

Does have a technique/code for marking the rows that are visible in
pivot table.

Assume some function has to walk through the columns checking whethe
the value is visible/invisible in the pivot then place a marker in
column.

Could probably get by with a function that marked visible rows in
filtered column.

thanks

plak
 
plake,

When you filter your range, you can use visiblecells to step through the
cells that are actually showing: this code will put "filtered" to the right
of the filtered cells in a filtered range, in this example, in column E next
to the filtered range of A1:D10

Dim myCell As Range
For Each myCell in Range("A1:D10").Columns(4).SpecialCells
(xlCellTypeVisible)
myCell.Offset(0,1).Value = "Filtered"
Next myCell

What is it that you actually need to do - why do you want to mark the
cells?

HTH,
Bernie
MS Excel MVP
 
Back
Top