ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Format Cell based on two other cells in same row. (https://www.excelbanter.com/excel-programming/395924-re-format-cell-based-two-other-cells-same-row.html)

Radsan

Format Cell based on two other cells in same row.
 
Thank you very much. Does exactly what it says on the tin!!!

Thanks a million..

"Trevor Shuttleworth" wrote:

On way:

Conditional Format formula for same string:

=OR(AND(D3="B MAJOR",L3="B MAJOR"),AND(D3="B MINOR",L3="B MINOR"))

I'll leave you to extend to red condition depending on your exact needs

One possibility, if the strings are always as expected:

=OR(AND(D3="B MAJOR",L3="B MINOR"),AND(D3="B MINOR",L3="B MAJOR"))

Regards

Trevor


"Radsan" wrote in message
...
In a decision matrix, I want to change the colour of the cells in column
range I3:I216 based on a comparison between two strings in D3:D216 and
L3:L216. The value in column D and column L can only be either "B MAJOR"
or
"B MINOR".

For example I want I3 to be green if both D3 and L3 contain the same
string
or red if they both contain different strings. These string values are
coming
from If statements and VLookups.

I tried a helper column R where I used if(EXACT(D3,L3)=TRUE,1,0) to
populate
the column with 1's and 0's. But I cannot get I3 to change colour
depending
on R3 values of 1 or a 0 by conditional formatting.

It probably needs programmatic solution, but I am have no idea how to go
about writing VB code. I am at my wits end and would be grateful for any
help.






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

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