Hi All
I have an existing macro (that works) that searches a particular column for any text, and when it does it inserts one row. I have been trying to adapt this same code to create a border on the top edge of the cell where it finds text in column B (I actually need it to add the to columns A-J for that row but haven't gotten that far yet). I can't use CF as there are other borders I do not want in impact on.
Below is the code that I have, and being a real beginner I need some help
Thanks in advance
Karen
Sub Borders()
With Range("B14:B40")
On Error Resume Next
Set C = .Find(What:="*", LookIn:=xlValues)
If Not C Is Nothing Then
firstaddress = C.Offset(1, 0).Address
Do
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstaddress
End If
End With
End Sub
Bookmarks