Hello All,
I am trying to format a cell to be a certain color and have a double line border at the top of the cell if the value of another cell is ='Total'. I have tried conditional formatting but there are only single line borders. Here is the code that is generated when I record a macro to border with double lines. I just need to know how to apply the condition for a cell value.
thanks so much in advance.
dinzana
<code>
Sub borderDoubleLine()
'
' borderDoubleLine Macro
' Macro recorded 6/18/2008 by Mobile Software
'
'
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub
</code>
I am trying to format a cell to be a certain color and have a double line border at the top of the cell if the value of another cell is ='Total'. I have tried conditional formatting but there are only single line borders. Here is the code that is generated when I record a macro to border with double lines. I just need to know how to apply the condition for a cell value.
thanks so much in advance.
dinzana
<code>
Sub borderDoubleLine()
'
' borderDoubleLine Macro
' Macro recorded 6/18/2008 by Mobile Software
'
'
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
End Sub
</code>