Conditional Formatting: Column with blank cell to have colour based on value from another column

atisyam

New Member
Joined
Sep 19, 2018
Messages
37
Hello

Basically, my question is that if one column has a blank cell AND another column within the same row contained any text except for B&G, then the blank cell will be highlighted (any color).

So based on the figure below: B1 will not be highlighted but both B2 and B3 will be highlighted.

ABC
1B&G
2B&G&C
3A&G

<tbody>
</tbody>


Best if the functions used are any available from excel except VBA macro code due to different worksheet formatting. :/ Thank youuu.

 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi

Select cell B2

Go to Conditional Formatting > New Rule > Use a formula to determine which cells to format

Enter the following formula

=IF(AND(A2="",C2="B&G"),TRUE,FALSE) in Format values when this formula is true box

Click on format and select a color for Fill

Close the dialog boxes

Copy down the format from B2 to other cells in Column B

It should work.

Kind regards

Saba
 
Upvote 0
Hi

Select cell B2

Go to Conditional Formatting > New Rule > Use a formula to determine which cells to format

Enter the following formula

=IF(AND(A2="",C2="B&G"),TRUE,FALSE) in Format values when this formula is true box

Click on format and select a color for Fill

Close the dialog boxes

Copy down the format from B2 to other cells in Column B

It should work.

Kind regards

Saba


Hi Saba

Unfortunately, the formula did not work. I've followed as per stated in your steps.

And also, correct me if I'm wrong but it should be =IF(AND(B2="" instead of A2 as the blank column is in column B? Anyways, I tried this too but it did not work.

I will still try to play around with other available functions. Thanks for your effort.
 
Upvote 0
How about
=AND(B1="",C1<>"B&G")
Change B1 & C1 to reflect the first row in the applies to range
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,885
Messages
6,122,085
Members
449,064
Latest member
MattDRT

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