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

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi & welcome to MrExcel.
How about
Excel Formula:
=NOT(OR(ISNUMBER(SEARCH("Chewing problem",$AC3)),ISNUMBER(SEARCH("Swallowing problem",$AC3))))
 
Upvote 0
Try something like this:
Excel Formula:
=OR(NOT(ISERR(SEARCH("chew",K11))),NOT(ISERR(SEARCH("swallow",K11))))
 
Upvote 0
A slightly simpler option to post#2
Excel Formula:
=AND(ISERROR(SEARCH("Chewing problem",$AC3)),ISERROR(SEARCH("Swallowing problem",$AC3)))
 
Upvote 0
Solution
@JamesCanale I tried this one, wihch gave the following. It highlighted the cells contained chew / swallowing - however I want the cells not containing those to be highlighted.

=OR(NOT(ISERR(SEARCH("chew",$AC3))),NOT(ISERR(SEARCH("swallow",$AC3))))

Untiwtled.png


@Fluff - =AND(ISERROR(SEARCH("Chewing problem",$AC3)),ISERROR(SEARCH("Swallowing problem",$AC3))).

This one worked perfectly
Untitlssed.png



Thank you for your help sir. If I have any more questions, I will let you know - however I will use the above formula and adapt it to the other variables.

Regards
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
@Fluff

Sorry. I forgot to mention - I also want the option to remain Grey - except for when cell AD4 for Speech difficulties says Yes. - as Having speech difficulties trigges SALT refferal.

I tried the following:

Excel Formula:
=AND(ISERROR(SEARCH("Chewing problem",$AC3)),ISERROR(SEARCH("Swallowing problem",$AC3),ISERROR(SEARCH("Yes",$AD3)))

However - when trying it says 'You've entered too many arguments'
 
Upvote 0
@Fluff

If it helps explaining - someone may have have a Swallowing / Chewing problem - however - may have a speech problem. In that case I would also want SALT referral to be triggered. As in the picture below

jdjd.png

Kind Regards
 
Upvote 0
Will AD only have "Yes" or could it have "Yes" along with other text?
 
Upvote 0
Will AD only have "Yes" or could it have "Yes" along with other text?
Currently it is Just Yes - or No.

However - it may have Yes - dysarthria in the future.

If the formula is different - please include ones for both.

Regatds
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,738
Members
448,988
Latest member
BB_Unlv

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