How do I write "if"statement for border or no border?

B

bobbyward

I want a cell to have a border if the adjacent cell is > 0, and no border if
adjacent cell is not greater than 0. I don't know how to write the border
language in an "if" statement.

Thanks.
 
T

tjtjjtjt

Where are you trying to write this? As a worksheet IF Function or in a VBA
procedure?
Adjacent ...to the left or to the right?

You might try this as an alternative:
Set the conditional Formatting.
Ex:
If your Cell is E9:
Format | Conditional Formatting
Change the Condition Drop=down to Formula Is
Type =D9>0
Change the Formatting of the cell to have a Border.

tj
 
Top