Highlight adjacent cells if contain data

Cruiser69

Board Regular
Joined
Mar 12, 2018
Messages
61
Office Version
  1. 365
Platform
  1. Windows
Hi all.
Could anyone please help with highlighting adjacent cells if they contain data.
I have tried conditional formatting, but have had no luck.
What I am trying to achieve is if there is data in columns B & C, for the row to turn to yellow.
If only in column B, then turn to blue
If only in column C, turn to orange.


1682720100152.jpeg


Thanks for looking.

Regards,

Graham
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi @Cruiser69 . Thanks for posting on the forum.

Try this.
Notice how the $ signs are placed in the conditional formatting formulas:
Dante Amor
ABCDEFGH
1ABCDEFGH
211
32
43
544
65
76
878
9
10
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:H10Expression=AND($B2="",$C2<>"")textNO
A2:H10Expression=AND($B2<>"",$C2="")textNO
A2:H10Expression=AND($B2<>"",$C2<>"")textNO



--------------
Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor
--------------
 
Upvote 0
Solution
try:
Book1
ABC
1
2213278
3283
4
5299
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:C5Expression=AND($B2="",$C2<>"")textNO
A2:C5Expression=AND($B2="",$C2="")textNO
A3:C5Expression=AND($B3<>"",$C3="")textNO
A3:C5Expression=(AND($B3<>"",$C3<>""))textNO
A2:C5Expression=AND($B2<>"",$C2="")textNO
A2:C5Expression=(AND($B2<>"",$C2<>""))textNO
 
Upvote 0
Other way.

1. select, for example, the range A2:H20.
2. In conditional formatting, use the following formulas in the order I listed:
Excel Formula:
=LEN($B2)>0
=LEN($C2)>0
=AND(LEN($B2)>0,LEN($C2)>0)
3. with the last formula entered (in the window it will be the first one), check "Stop if True".
4. done

Artik
 
Upvote 0
Hi all.

Thanks for all your replies.
I've tried them all and they all work perfectly.

Regards,

Graham
 
Upvote 0

Forum statistics

Threads
1,215,139
Messages
6,123,259
Members
449,093
Latest member
Vincent Khandagale

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