Ich hab da mal wieder ein kleines Problem ich habe hier ein Makro mit dem ich die celle A23 -F 23 kopieren möchte das ist nicht das Problem jetzt möchte ich sie wieder an einer Bestimmten Spaltze wieder einfügen
Cells(varPB + 3)
aber das hat nicht hin .
Mein Makro sieht so aus
Range("A27:F27").Copy Destination:=Range(Cells(varPB + 3)
Hier ist das komplette Makro ich hoffe die beschreibung reicht
Sub AutoForm1_BeiKlick()
Dim varPB As Variant
Dim iPage As Integer, iRowL As Integer
iRowL = Cells(Rows.Count, 1).End(xlUp).Row
iPage = 1
Do While IsError(varPB) = False
varPB = ExecuteExcel4Macro("INDEX(GET.DOCUMENT(64)," & iPage & ")")
If IsError(varPB) Then
Exit Sub
Else
Rows(varPB - 1 & ":" & varPB + 3).Insert Shift:=xlDown
Range(Cells(varPB - 1, 5), Cells(varPB - 1, 6)).Select
With Selection
.MergeCells = True
End With
Cells(varPB - 1, 4) = "Übertrag"
Cells(varPB - 1, 5) = Application.Sum(Range(Cells(1, 6), _
Cells(varPB - 1, 6)))
Range(Cells(varPB + 1, 5), Cells(varPB + 1, 6)).Select
With Selection
.MergeCells = True
End With
Cells(varPB + 1, 4) = "Übertrag"
Cells(varPB + 1, 5) = Application.Sum(Range(Cells(1, 6), _
Cells(varPB - 1, 6)))
Range("A27:F27").Copy Destination:=Range(Cells(varPB + 3))
End If
iPage = iPage + 1
Loop
End Sub