Option
Explicit
Sub
Linien()
Dim
lngLetzteZeile
As
Long
Dim
rngSEARCH
As
Excel.Range
Dim
Zelle
As
Excel.Range
With
ThisWorkbook.ActiveSheet
lngLetzteZeile = .Cells(.Cells.Rows.Count,
"A"
).
End
(xlUp).Row
Set
rngSEARCH = .Range(
"$A$1:$A$"
&
CStr
(lngLetzteZeile))
For
Each
Zelle
In
rngSEARCH
If
IsDate(Zelle)
And
Zelle.NumberFormat <>
"dddd"
Then
With
Zelle.EntireRow.Columns(
"A:A"
).Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End
With
Else
Zelle.EntireRow.Columns(
"A:A"
).Borders(xlEdgeTop).LineStyle = xlNone
End
If
Next
End
With
Set
rngSEARCH =
Nothing
End
Sub