Wir haben ein Makro über eine Schaltfläche in Excel 2013 arbeiten, um eine neue Zeile mit Formel von oben einzufügen. Das Problem ist, wenn es läuft und ich sage zum Beispiel aus Zeile 10 kopieren die Formel in der neuen Zeile 11 alle noch in Zeile 10 nicht 11 gelesen?Formel von oben kopieren
Sub Loop_InsertRowsandFormulas()
Dim ws As Worksheet: Set ws = ThisWorkbook.Worksheets("Risk Input Sheet")
Dim vRows As Long
Dim lastCol As Long
Dim firstRow As Long
firstRow = InputBox("Enter Row To Start Insert From.")
vRows = InputBox("Enter Number Of Rows Required")
If firstRow = 0 Or vRows = 0 Then Exit Sub
Debug.Print firstRow
IngA = ws.Cells(5, ws.Columns.Count).End(xlToLeft).Column
For myLoop = 1 To vRows
ws.Range("A" & (firstRow + myLoop)).EntireRow.Insert
ws.Range("A" & (firstRow + myLoop) & ":BB" & (firstRow + myLoop)).Formula = ws.Range("A" & firstRow & ":BB" & firstRow).Formula
Next
End Sub
Wie kann ich es nur kopieren die Formel und nicht den Text. – Chris