Web Development
Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to make the top border for a row set to heavy black line IF the value of the first cell in the current row begins with "CUST:". Seems simple, but I can't find it.
5 replies
by syscokid
You can use conditional formatting but it appears that you are limited to thin lines only. Is there another way you can highlight your data, perhaps with colors or shading? Click on Format, Conditional Formatting to see what I mean.
by lewis_rs
The main problem is actually how to set the loop looking for that value.
I should probably get a class in VB.
by graemeh
This would be one way:
Sub ApplyBorders()
If InStr(ActiveCell.Value, "CUST") Then
ActiveCell.EntireRow.Select
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThick .ColorIndex = xlAutomatic
End With
End If
End Sub
HTH
by lewis_rs
Thanks, HTH. That did the job.
by lewis_rs
This question was closed by the author
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
1 helpful
8 replies
0 helpful
0 replies
Question
PDF vs HTML
0 helpful
1 reply
0 helpful
1 reply
0 helpful
1 reply