I am trying to create a moving funding line, if the amount in column N6:N387 is greater than $737,844,644 I want the row to be underlined.
First I am getting a mismatch error, I think due to the currency, secondly, how do I get this to loop down the column and keep evaluating till the condition is true?? Not sure of the syntax. (I guess I will have to add some general formatting so that multiple rows do not become underlined as the funding line moves.)
If I can get this correct, I will tie the code to a cmd button.
Excel 2002,
thanks for any help, Ron
Sub exampleformat()
'create line on worksheet at funding line > $737,844,644
If ("N6"
> 737844644 Then
Range("B6:N6"
.Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
Else: End If
End Sub
First I am getting a mismatch error, I think due to the currency, secondly, how do I get this to loop down the column and keep evaluating till the condition is true?? Not sure of the syntax. (I guess I will have to add some general formatting so that multiple rows do not become underlined as the funding line moves.)
If I can get this correct, I will tie the code to a cmd button.
Excel 2002,
thanks for any help, Ron
Sub exampleformat()
'create line on worksheet at funding line > $737,844,644
If ("N6"
Range("B6:N6"
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThick
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 1
End With
Else: End If
End Sub