ich brächte einen VBA-Code der folgendes auslöst.
Wenn im Bereich A7:NG100 die Zelle nicht leer ist, dann umrahmen.
Habe es schon zum Teil mit dem Makrorecorder versucht. Allerdings läuft das Makro so endlos...
Vielen Dank!
Gruß
Thomas
Mein Versuch...
Sub Umrahmen()
Dim Zelle As Range
For Each Zelle In Sheets("Anwesenheit").Range("A7:NG100").Cells
If Zelle.Value "" Then 'ist nicht leer
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
End If
Next
End Sub