Format if cell value is equal to AND if adjacent cell value is.

cssmith

New Member
Joined
Jul 12, 2014
Messages
3
We are trying to find subcontractors we did not pay for Job 5202, but we got paid for Job 5202.

Column A is Yes or No (Did we get paid for the work order)
Column B is Yes or No (Did we pay subcontractor for that work order)

If B2 is No, I'd like to highlight it green only if A2 is Yes.
(meaning we didn't pay out, but got paid)

If B3 is No, and A3 is No, no formatting needed.
(meaning we haven't been paid yet)

If B4 is Yes and A4 is Yes, no formatting needed.
(meaning we got paid and paid out)


And there is no possibility we paid out if we haven't been paid yet, but if needed for the formula, if B5 is Yes and A5 is No, there is no formatting needed.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi,

What I am reading from your description is that only one instance needs to formatted. In Excel 2010 in the conditional formatting drop down you would use the last rule type listed "Use a formula to determine which cells to format" and that formula would be:
Code:
=AND(B2="No",A2="yes")

You can then choose whatever color suits you with the "Format..." button.

HTH

igold
 
Upvote 0
Hi,

What I am reading from your description is that only one instance needs to formatted. In Excel 2010 in the conditional formatting drop down you would use the last rule type listed "Use a formula to determine which cells to format" and that formula would be:
Code:
=AND(B2="No",A2="yes")

You can then choose whatever color suits you with the "Format..." button.


HTH

igold


I must be missing something here. I did try that, but instead of B2 turning green itself if the value is No, B1 will turn green.

A2=Yes and B2=No, but B2 does not format green text, for some reason whatever is in B1 turns green.
 
Upvote 0
Are you sure you have entered the conditional format into cell B2 and not in B1. Also if you look at the Conditional Format drop down under "Manage Rules" it will show you what cell the format applies to. Make sure it says B2.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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