Conditional formatting based on adjacent cell

ssgmiami

New Member
Joined
Nov 12, 2007
Messages
22
I am using Excel 2007,

I need to highlight in RED cells in a pivot table if the value in the adjacent cell is less than the referenced cell.

For any row in the Pivot Table
If Cell in column C = 0
and Cell in column D = 1

Cell in column D should be highlighted in RED.

I can't seem to figure out how to refer to the adjacent cell in a conditional format formula.

Can someone help.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Select Column D and use the following formula:

=AND($C1=0,$D1=1)
 
Upvote 0
A little clarification, D = 1 and C = 0 were only examples. I need to flag column D whenever it's value is greater than column C, regardless of the values.

Example:
D = 5
C = 2

D = 0
C = -1

Sorry for the confusion.
 
Upvote 0
I don't know about Excel 2007, but in prior versions, just make the formula suit the cell that is active when you are setting up the conditional format.

So, if you select range B2:B100 and the single cell that is active is B2, the formula might be =B2>A2

This (note relative reference) will then apply to all selected cells in the same relative way. You can check after applying it.

If though cell B10 were active, you'd type in =B10>A10

HTH
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,185
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top