Conditional highlighting is based on the contents of the cell to be highlighted, either on its own or when compared to some other cell. An example would be for cell B2 to highlight itself with green text if the contents in B2 are the same as in D2. What you are asking, though, is to have cell B2 highlight in green text based solely on the contents of D2. It is a common desire, and is one I share, but you cannot do that directly. It takes a trick. Here is one way:
- Create a new column. Let's say it is column E.
- Formula in column E2 is If(D2, "~", "")
- Fill down to the rest of the column
- Select all the cells in column B that you want to highlight, with B2 being the top one in this example.
- Format as red text. This is the default color.
- Start to create a highlighting rule of "Text does not end with"
- When you get to the box where you would enter what it "does not end with", click on the green oval then click on cell E2
- Click on the checkmark to accept your selection (do not use enter/return, you have to use the checkmark)
- Choose green text as the highlight
- Click Done. All the selected cells in column B will get a highlighting rule based on the corresponding value in column E
Hide column E after you have it all working.
It may look like a lot but really the only extra thing you have to do is create column E with its formulas. The rest is nearly the same (the same number of steps) as you would have to do anyway.
You can use this same method to highlight entire rows. In step4 4 you will select all the columns to be highlighted and in step 7 you will have to edit the E2 in the highlighting rule to be $E2.