View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
stoppal stoppal is offline
external usenet poster
 
Posts: 8
Default URGENT! How to read value in pivot table

thank you for the extra help once again!!!

The reason I need to add condiftional formating using VBO rather than
the menu bar is b/c the program has a limit of 3 conditions. I need to
have at least 8 different conditions.

The code you provided at least provide some reference to the pivot
talbe, which is new to me, so thank you. do you know how to reference
the value?

thanks




ShaneDevenshire wrote:
Hi,

A little more detail would be useful - are you trying to have the
conditional formatting apply to the whole table? Is it the same condition
for all the cells in the table?

Here is a simple macro which applies conditional formatting to a specific
pivot table. All I did was turn on the recorder.

Sub Macro4()
ActiveSheet.PivotTables("PivotTable1").PivotSelect "", xlDataOnly, True
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="10"
Selection.FormatConditions(1).Interior.ColorIndex = 22
End Sub

--
Cheers,
Shane Devenshire


"stoppal" wrote:

Hi,

I need some help. trying to use VB to read the value of a pivot table
so I can conditional format the cells. I know how to conditional
format using VB on normal cells, but I don't know how for pivot tables.
How can I reference values from a pivots table?

thank you