Sub Einrahmen()
Application.ScreenUpdating = False
For Each Zelle In Range("B2:P5")
With Zelle.Borders(xlEdgeLeft)
.LineStyle = xlNone
End With
With Zelle.Borders(xlEdgeTop)
.LineStyle = xlNone
End With
With Zelle.Borders(xlEdgeBottom)
.LineStyle = xlNone
End With
With Zelle.Borders(xlEdgeRight)
.LineStyle = xlNone
End With
Next
For Each Zelle In Range("B2:P5")
If Zelle <> "" Then
With Zelle.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Zelle.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Zelle.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Zelle.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End If
Next
Application.ScreenUpdating = True
End SubOption Explicit
Sub Leerzeilen()
Dim i As Integer
Dim Menge As Integer
Application.ScreenUpdating = False
Menge = ActiveSheet.UsedRange.Rows.Count
For i = Menge To 6 Step -1
Rows(i).Insert Shift:=xlDown
Rows(i).Insert Shift:=xlDown
With Range(Cells(i, 1), Cells(i, 4))
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With
Next
End SubOption Explicit
Sub Leerzeilen()
Dim i As Integer
Dim Menge As Integer
Application.ScreenUpdating = False
Menge = ActiveSheet.UsedRange.Rows.Count
For i = Menge To 6 Step -1
Rows(i).Insert Shift:=xlDown
Rows(i).Insert Shift:=xlDown
With Range(Cells(i, 1), Cells(i, 4))
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With
Next
End Sub
Über Bedingte Formatierung gesammte Zeilen einfärben
raffi83 16.07.2009 - 406 Hits - 10 Antworten
Makro zum Zeilen löschen und einfügen
Jeremy 28.10.2009 - 363 Hits - 8 Antworten
automatische Verschiebung beim EInfügen von neuen Zeilen
m-o-m 18.11.2009 - 159 Hits - 2 Antworten
Zeilen inkl. Formel einfügen
Jeremy 31.01.2010 - 255 Hits - 8 Antworten
Vor neuem Datum Zeilen einfügen
handballplatin7 18.10.2010 - 142 Hits - 8 Antworten