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
Discussion Locked
What Makes a Business Website Effective in 2026
2 helpful
10 replies
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply
Question Unanswered
Best Way to Make Long WordPress Location Guides Mobile Friendly
0 helpful
0 replies
Discussion
Optimizing WordPress widgets and DOM size
0 helpful
3 replies