Conditional Statement For Colored Cell Borders

  • Thread starter Thread starter nvhelp
  • Start date Start date
N

nvhelp

I need to write a conditional statement basically says:

If cell (for example, A1) is "Wrong" "Mistake" OR "Error" then the next cell
(say, A2) must have red borders.

Can someone please help?

Thanks
 
Suppose you want this to apply to any of the cells in the range
A2:A30.

Highlight that range, starting with A2, and click on Format |
Conditional Formatting. In the pop-up, select Formula Is rather than
Cell Value Is in the first box, and in the next box enter this
formula:

=OR(A1="wrong",A1="mistake",A1="error")

Then click on the Format button, select the Borders tab, choose Red
from the Colors drop-down, then choose the style, then click on
Outline. Click OK twice to exit the dialogue box.

Then you can put any of those words in A1:A29 and the cell below it
will have a red border.

Hope this helps.

Pete
 
Try this...

Select cell A2
Goto the menu Format>Conditional Formatting
Select the Formula Is option
Enter this formula in the box on the right:
=OR(A1="wrong",A1="mistake",A1="error")
Click the Format button
Select the Borders tab
Select a line style (there aren't too many to choose from)
Select a color - red
Click the Outline icon
OK out
 
Pete_UK said:
=OR(A1="wrong",A1="mistake",A1="error")
....

While you can't use arrays directly in conditional formatting, you can
refer to names defined as array constants. If the name TrapWords were
defined as

={"wrong","mistake","error"}

you could use the conditional formatting formula

=OR(A1=TrapWords)
 
Back
Top