kann mir jemand helfen den Code umzuschreiben?
Ursprünglich wurde auf Zeile 26 kopiert. Nun soll ab Zeile 15 kopiert werden. Kann mir jemand den Code anpassen. Die oberen Zeilen Verstehe ich (an den Stellen wo 27/>26 steht). Weiter unten mit 11,12,13 leider nicht mehr ;)
Wäre über Tipps Dankbar!
Option Explicit
Sub Zusammenfassen()
Dim wks As Worksheet, wksT As Worksheet
Dim vRow As Variant
Dim iRowL As Integer, iRowT As Integer, iRow As Integer, iRowA As Integer
On Error GoTo ERRORHANDLER
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set wksT = Worksheets("Zusammenfassung")
wksT.Rows("27:" & wksT.Rows.Count).ClearContents
For Each wks In ThisWorkbook.Worksheets
If wks.Name Like "KW##" Then
iRowL = wks.Cells(wks.Rows.Count, 1).End(xlUp).Row
If iRowL > 26 Then
iRowT = wksT.Cells(wksT.Rows.Count, 1).End(xlUp).Row + 1
wks.Rows(27 & ":" & iRowL).Copy wksT.Cells(iRowT, 1)
End If
End If
Next wks
wksT.Cells.Validation.Delete
iRowL = wksT.Cells(wksT.Rows.Count, 10).End(xlUp).Row
For iRow = 2 To iRowL
wksT.Cells(iRow, 13).Value = wksT.Cells(iRow, 11).Value + wksT.Cells(iRow, 12).Value
Next iRow
ERRORHANDLER:
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub