Conditional formatting - highlight cells based on text in another

BravoBravoAu

Board Regular
Joined
Nov 8, 2011
Messages
64
Office Version
  1. 2016
Platform
  1. Windows
Hi guys - hopefully another easy Conditional Formatting issue.

In my workbook, if cell J2 contains YES, I want E2 and F2 to be highlighted Green and so on throughout the sheet on a row by row basis.

I have a rule in conditional formatting corresponding to E2 and F2.
  • Formula: = $J2="YES".
  • Format: fill, green.
  • Applies to: $E$2:$F$10896

I can get row 2 to 'work' using the above, but when I type YES into J3...nothing happens.

Help please?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
It works fine for me. Perhaps you have other rules interfering with it?

Try the following to reset the whole thing and start over:
- First, remove ALL conditional formatting rules from your sheet
- Then select the range E2:F10896
- Then go to Conditional Formatting, go to the Formula option and enter the formula: =$J2="YES"
- Select your green fill option
- Click OK

This should do what you want.
 
Upvote 0
Thanks @Joe4.

I followed your suggestion (acknowledging it was as I had previously), and no improvement. In fact, now, not even row 2 is highlighting... I cleared all conditional formatting in the workbook prior.

The YES result in column J is derived from a droplist (YES/NO), but I can't see that this would be a problem.
 
Upvote 0
There is really only two things I can think of that would cause it not to work:

- Your drop list isn't really returning "YES". Maybe there is an extra space on the end that needs to be removed.
Here is a simple test. Pick any cell that is equal to "YES" from this drop-down. Let's say it is cell J2. Then enter this formula in any blank cell:
Code:
=J2="YES"
If that does not return TRUE, then there is more to your drop-down then "YES", probably an extra space somewhere.
You can check that with this:
Code:
=LEN(J2)
which should return 3.

If the formula =J2="YES" returns TRUE, and your Conditional Formatting still isn't working, then it is most likely that you have not set it up right. Make sure that you are selecting JUST the rows you want to apply it when entering the formula, and NOT the whole column.

Also, which version of Excel are you using, and do you have any merged cells anywhere on the sheet?
 
Upvote 0
@Joe4 - you are a genius!!! I hadn't considered that was the issue and was remiss to not mention it in my initial post.

Both of your troubleshooting steps confirm that was the issue and rectifying the extra space at the end of the 'YES' in the drop list has cleared the problem.

Thank you so much.
 
Upvote 0
You are welcome!

Glad we got it all sorted.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,250
Members
452,623
Latest member
Techenthusiast

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