Excel Conditional Formatting - Grey out cell when criteria not met.

nhsmedic

New Member
Joined
Jan 26, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
Hello Everyone.

I am making a data collection form.

Within the form, one column has cells - where there are multiple inputs.

I want the cell under SALT assessment to stay greyed out - and only become visible if either "chewing problem", or "swallowing problem" is selected in a cell from the AD column

dal.png


There are many input variables in the cell - so I have included AD4 - which says Drooling, Bloating, Swallowing Problem. As "swallowing problem" is in this cell - I want the cell to not be greyed out.

In contrast, if the cell was to contain anything other than "chewing problem", or "swallowing problem" - I want it to remain grey.


I tried =NOT(OR($AC3="Chewing problem", $AC3="Swallowing problem")). However this only works if the only value in the cell is that one of the two. The moment another option is added, eg so the cell reads "Swallowing problem, drooling" - the cell becomes grey again. As witnessed below

d.png


I will appreciate any help.

Kind Regards
 

Attachments

  • dal.png
    dal.png
    5.3 KB · Views: 6
In that case use
Excel Formula:
=AND(ISERROR(SEARCH("Chewing problem",$AC3)),ISERROR(SEARCH("Swallowing problem",$AC3)),ISERROR(SEARCH("Yes",$AD3)))
You were simply missing a bracket after the 2nd argument.
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
In that case use
Excel Formula:
=AND(ISERROR(SEARCH("Chewing problem",$AC3)),ISERROR(SEARCH("Swallowing problem",$AC3)),ISERROR(SEARCH("Yes",$AD3)))
You were simply missing a bracket after the 2nd argument.
Oh Dear! Thank you for spotting that. I tried looking for the mistake - but couldnt find it. Thank you for all your help sir.
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,855
Members
449,096
Latest member
Erald

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