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: 2

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,626
Office Version
  1. 365
Platform
  1. Windows
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.
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

nhsmedic

New Member
Joined
Jan 26, 2021
Messages
6
Office Version
  1. 2019
Platform
  1. Windows
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.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,626
Office Version
  1. 365
Platform
  1. Windows
My pleasure.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,765
Messages
5,626,747
Members
416,202
Latest member
donya ba

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
Top