ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Complex conditional formatting (https://www.excelbanter.com/excel-worksheet-functions/209920-complex-conditional-formatting.html)

Brian_M

Complex conditional formatting
 
I have the following problem trying to set cell color based on conditional
parameters.
I have a large spreadsheet where I do a log transform to get a result.
Because of the formula, I lose the sign of the function. The columns look
like this:

Number1 Number2 Formula_Result
a l x
b m y
c n z

I want to conditionally format the cells in the Formula_Result column RED if
Number1Number2, and GREEN if Number1<Number2. I'm stuck. I can do an
individual cell, but can' figure out how to do that to the entire column.
Just to be clear the result of comparing "a" and "b" control formatting of
'x', the result of comparing "b" and "c" control formatting of "y", etc.



[email protected]

Complex conditional formatting
 
Brian

You can conditionally format an entire column just as you would a
single cell. Click on cell c2, highlight column C; then
Format
Conditional Formatting

Condition 1, formula is =A2B2 then your red format
Condition 2, formula is =B2A2 then your green format

If they are equal they will pick up the default format, that is
whatever you make the column format.

I assume your final "clarifying" sentence was incorrect since it seems
to conflict with you initial statement.

Good luck.

Ken



On Nov 11, 4:02*pm, Brian_M wrote:
I have the following problem trying to set cell color based on conditional
parameters.
I have a large spreadsheet where I do a log transform to get a result.
Because of the formula, I lose the sign of the function. The columns look
like this:

Number1 *Number2 *Formula_Result
a * * * * * * * * *l * * * * * * * * * x
b * * * * * * * * *m * * * * * * * * y
c * * * * * * * * *n * * * * * * * * *z

I want to conditionally format the cells in the Formula_Result column RED if
Number1Number2, and GREEN if Number1<Number2. I'm stuck. I can do an
individual cell, but can' figure out how to do that to the entire column.
Just to be clear the result of comparing "a" and "b" control formatting of
'x', the result of comparing "b" and "c" control formatting of "y", etc.



Brian_M[_2_]

Complex conditional formatting
 


" wrote:

Brian

You can conditionally format an entire column just as you would a
single cell. Click on cell c2, highlight column C; then
Format
Conditional Formatting

Condition 1, formula is =A2B2 then your red format
Condition 2, formula is =B2A2 then your green format

If they are equal they will pick up the default format, that is
whatever you make the column format.

I assume your final "clarifying" sentence was incorrect since it seems
to conflict with you initial statement.

Good luck.

Ken



On Nov 11, 4:02 pm, Brian_M wrote:
I have the following problem trying to set cell color based on conditional
parameters.
I have a large spreadsheet where I do a log transform to get a result.
Because of the formula, I lose the sign of the function. The columns look
like this:

Number1 Number2 Formula_Result
a l x
b m y
c n z

I want to conditionally format the cells in the Formula_Result column RED if
Number1Number2, and GREEN if Number1<Number2. I'm stuck. I can do an
individual cell, but can' figure out how to do that to the entire column.
Just to be clear the result of comparing "a" and "b" control formatting of
'x', the result of comparing "b" and "c" control formatting of "y", etc.


No, the latter is what I really mean.


if B2A2, C2 is RED, if B2<A2, C2 is GREEN
if B3A3, C3 is RED, if B3<A3, C3 is GREEN
if B4A4, C4 is RED, if B4<A4, C4 is GREEN
....


All times are GMT +1. The time now is 11:39 PM.

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