Conditional formatting one cell based on a condition in a range.

bigsi1984

New Member
Joined
Nov 28, 2013
Messages
30
Hello,

I have a cell S9 that I want to turn red if an of the cells below it contain the word invalid.

All of the ells below it use conditional formatting how either ok or invalid. The issue is there are 200 cells and unless any of the first 10 or so are invalid you have to scroll. I am looking for a solution that immediately highlights if there are any invalid entries.

Can you help?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
If I read this right you could try using a CountIF formula in S9 to tell you how many cells below contain the word Invalid that way you know how many you have to check. You can then also add Conditional Formatting to S9 so if it counts greater than 0 it will change colour.
 
Upvote 0
In cell S9 use this formula under conditional formatting:

=(S10:S250)="invalid"
 
Last edited by a moderator:
Upvote 0
But I want it to change S9 if any cells between S10 and S200say invalid. That formula isn’t working for any cell other than S10. Sorry if Iwasn’t clear.

 
Upvote 0
This works a treat but is not quite as neat as I would like. If I cannot get the solution I want then I will go with this. Thanks
 
Upvote 0
In Cell S9:

=IF(SUMPRODUCT(--(S10:S250="invalid")),"Invalid","Valid")

Then in conditional formatting:

=S9="Invalid"

Choose fill color
 
Last edited by a moderator:
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

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