ShaneDevenshire
12/19/2006 1:58:00 AM
Hi,
I see, its not really conditional formatting its VBA controlled formatting.
I'm not sure what you mean by "reference the value", please elaborate. I
need more info to help with this.
Keep in mind that you will need to run the macro everytime you modify the
pivot table.
FYI - if and when you get Excel 2007 you will be able to add an unlimited
number of conditional formats, instead of just 3.
I'm at work this week so I won't always be able to respond quickly.
--
Thanks,
Shane Devenshire
"stoppal" wrote:
> 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
> > >
> > >
>
>