ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formatting where Matrix intersects (https://www.excelbanter.com/excel-discussion-misc-queries/214821-conditional-formatting-where-matrix-intersects.html)

Rebecca_SUNY

Conditional Formatting where Matrix intersects
 
I have a matrix (see below) and would like to format the row yellow and the
column red and where they INTERSECT orange. I am able to get the row and
column formatting to work but the intersection formula will not.

apple banana grapes
red 34 21 -
pink 20 22 -
black - - 12

Assuming I pick pink/banana, the 3rd row would be yellow, the 3rd column
would be red and the value in cell C3 (22) would be orange.

This is what I have right now for the intersection conditional formatting
"formula is" (assuming the full table is selected)

=IF(AND($A1="pink",A$1="banana"),,)

If only cell C3 is selected it would be

=IF(AND($A3="pink",C$1="banana"),,)

But it will not work. :(

Thanks for your help in advance.



~L

Conditional Formatting where Matrix intersects
 
You don't need the IF( ,,) parts.

Take that out, and you should be gold. Or blue, red, or whatever color you
choose to fill with.

"Rebecca_SUNY" wrote:

I have a matrix (see below) and would like to format the row yellow and the
column red and where they INTERSECT orange. I am able to get the row and
column formatting to work but the intersection formula will not.

apple banana grapes
red 34 21 -
pink 20 22 -
black - - 12

Assuming I pick pink/banana, the 3rd row would be yellow, the 3rd column
would be red and the value in cell C3 (22) would be orange.

This is what I have right now for the intersection conditional formatting
"formula is" (assuming the full table is selected)

=IF(AND($A1="pink",A$1="banana"),,)

If only cell C3 is selected it would be

=IF(AND($A3="pink",C$1="banana"),,)

But it will not work. :(

Thanks for your help in advance.



Rebecca_SUNY

Conditional Formatting where Matrix intersects
 
I took the IF out and it still didn't work. I had to change the order of the
conditions so that the intersection was FIRST and then the row and column
formatting were second and third. Then is worked like a charm.

Thanks.

"~L" wrote:

You don't need the IF( ,,) parts.

Take that out, and you should be gold. Or blue, red, or whatever color you
choose to fill with.

"Rebecca_SUNY" wrote:

I have a matrix (see below) and would like to format the row yellow and the
column red and where they INTERSECT orange. I am able to get the row and
column formatting to work but the intersection formula will not.

apple banana grapes
red 34 21 -
pink 20 22 -
black - - 12

Assuming I pick pink/banana, the 3rd row would be yellow, the 3rd column
would be red and the value in cell C3 (22) would be orange.

This is what I have right now for the intersection conditional formatting
"formula is" (assuming the full table is selected)

=IF(AND($A1="pink",A$1="banana"),,)

If only cell C3 is selected it would be

=IF(AND($A3="pink",C$1="banana"),,)

But it will not work. :(

Thanks for your help in advance.




All times are GMT +1. The time now is 08:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com