Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Conditional Statement For Colored Cell Borders

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Conditional Statement For Colored Cell Borders

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

On Jan 14, 11:26*pm, nvhelp wrote:
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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Conditional Statement For Colored Cell Borders

Try this...

Select cell A2
Goto the menu FormatConditional 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

--
Biff
Microsoft Excel MVP


"nvhelp" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Conditional Statement For Colored Cell Borders

Pete_UK wrote...
....
=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)
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Conditional Statement For Colored Cell Borders

Thanks for that clarification, Harlan.

Pete

On Jan 15, 1:52*am, Harlan Grove wrote:
Pete_UK wrote...

...=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)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 - cell borders not visible when cells colored JLW1 Excel Discussion (Misc queries) 3 February 28th 11 06:33 PM
Merged Cell Conditional Formatting Borders T Kirtley Excel Discussion (Misc queries) 2 June 1st 06 07:38 PM
Need conditional statement to paint a cell Jim Thomlinson Excel Discussion (Misc queries) 0 May 31st 06 03:44 PM
Need conditional statement to paint a cell Jim Thomlinson Excel Worksheet Functions 0 May 31st 06 03:44 PM
IF statement colored results matles007 Excel Worksheet Functions 1 May 18th 06 02:29 PM


All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"