Link to home
Start Free TrialLog in
Avatar of thomas-sherrouse
thomas-sherrouseFlag for United States of America

asked on

Compare Pivot Table Columns with Conditional Formatting.

I've got a Pivot Table set up the reviews a set of Projects. I want to highlight a value that is larger than the value in the next column. I know I could just do a formula or an IF statement and hide that, but I want to have something clean and easy.

Here's a screenshot of part of my Pivot Table:
 User generated imageWhat I want to do is Highlight the value in the "Total at Billing" column if it is larger than the value in the "Rev Budget" column.

In this example Row 12 should be highlighted.

ASKER CERTIFIED SOLUTION
Avatar of Member_2_6169280
Member_2_6169280
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thomas-sherrouse

ASKER

Is there any way to do it without a Macro?
you could use conditional formatting but it will take a while.
I've already got Conitional Formatting set up to highlight negative numbers, but instead of Highlight if less than $0 I want to highlight if less than the cell value to the left of the current number. This is a report that will be updated so I don't want any static or frozen references.
You could try to call the macro when the selection has change or pivot table update
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Call test
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Call test
End Sub

Open in new window