General Question

2davidc8's avatar

How do I do this in Excel? (please see details inside)

Asked by 2davidc8 (10189points) March 26th, 2018

I would like to select a group of cells, and for any cell in the group that contains the word ‘no’, its font color should be red. The remaining cells in the group should continue to have black font color.
How to do this?

Observing members: 0 Composing members: 0

8 Answers

funkdaddy's avatar

I don’t have it in front of me, but I’m seeing 0 answers so far, so maybe get you started.

I think the easiest way to do this is with “conditional formatting”, which is pretty simple to use, but I’m not finding a handy link right away.

Basically you define a condition (so you’d need a formula to find the word “no”) and a format (red text) and go from there.

Finding “no” could be as simple as

=ISNUMBER(SEARCH(‘no’,<your cell>))

but that will find things like “north” and “cannot” as well, so there’s probably a better option out there to handle case (to find “No” and “NO” as well) and whitespace (require “no” to be the complete cell).

Hope it helps get you going.

Dutchess_III's avatar

I have done it before but I don’t remember how….let me go look.

JLeslie's avatar

Yes, conditional format, and you need it to be “containing” the word no. Don’t choose “equal to” the word no. It’s something like that, I don’t remember the wording for sure, but you get the point. I don’t have it in front of me. If you make it “equal to” it needs to be exactly that word in the cell and nothing else.

You might be able to right click to go directly to conditional formatting, or you might have to do it up on the top bar where all the formatting stuff is. It works great. I use it on my spreadsheets.

CWOTUS's avatar

The easy answer is “Conditional Formatting”, which you can find on the “Home” tab of the main menu. (The default main menu, that is, because menus are highly customizable.)

In general, you’ll want to have a New Rule that uses a formula to determine the cells to format. You can make the formula refer to other cells other than the one you’re trying to format, but keep in mind that you may want to use relative or absolute references, depending on the rules you need. (For example, if the word to be checked for is in a particular column, then you’ll want to reference that in your conditional format formula with a $B1 style reference, so that as you copy the conditional format to the right, it still looks at cells in B:B.)

As @JLeslie has noted, the conditional format formula would be “something like”
=FIND( “NO”, UPPER( A1)) > 0
In this formula, the upper-case contents of A1 are being searched for the string “NO”, and if found and the condition is met (the ‘find’ value is > 0, meaning ‘not false’), then the font, fill, border and pattern selections you choose will be applied to the range of cells you specify.

It’s actually more complicated to explain than it is to do. Play with it, and you’ll get it. (And you’ll make a lot of mistakes along the way and learn a lot more that way, too.)

Keep in mind that these kinds of text conditions can be frustrating, so if it’s possible to add a helper column in the sheet to do the search ahead of time and then look for TRUE or FALSE values in that column, that’s a lot simpler.

2davidc8's avatar

Thanks, jellies. It was easier than I thought!

Dutchess_III's avatar

Everything is easy once you know how to do it!

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther