habe folgendes mit dem Makrorekorder aufgezeichnet
Sub Makro3()
ActiveCell.Rows("1:1").EntireRow.Select
ActiveCell.Offset(0, -4).Range("A1").Activate
Selection.Insert Shift:=xlDown
Selection.RowHeight = 25.5
ActiveCell.Offset(0, 1).Range("A1:T1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Locked = False
Selection.FormulaHidden = False
ActiveCell.Offset(0, 19).Range("A1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
ActiveCell.Offset(1, -20).Range("A1").Select
Selection.Copy
ActiveCell.Offset(-1, 0).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
ActiveCell.Offset(1, 0).Range("A1").Activate
Selection.RowHeight = 0
End Sub
Das alles soll geschehen wenn in Spalte B15-45 ein Buchstabe eingetragen wird.
wenn in der neu erstellten Zeile eine Zahl eingetragen wird (Spalte B) soll wieder alles Rückgängig gemacht werden.
Wer kann helfen das Makro aufzuarbeiten?
Danke im voraus für eure Mühe.
Gruß Michael