Would conditional formatting by itself do it?
Let's say you wanted to show the top border form row 3 to 250, columns A:Z.
Select A3:Z250 (making sure that row 3 has the active cell in it)
Go into conditional formatting, choose Use a formula to to determine which cell to format, use the formula:
=$E3<>""
choose your top border format, OK, OK.
Job done. See attached .xlsx file
Else a macro:
Sub blah()
For Each cll In Range("E3:E250").Cells
With Cells(cll.Row, 1).Resize(, 26).Borders(xlEdgeTop)
If cll.Value <> "" Then .LineStyle = xlContinuous Else .LineStyle = xlNone
End With
Next cll
End Sub
See attached .xlsm file, sheet2 and its button.