Danke Dir für die Antwort.
Ich bin kein VBA-Spezialist, daher habe ich gerade noch einige Fragezeichen...
"weiter" ist eine Variable - als was Definiere ich diese dann? Also DIM..???
Und wie implementiere ich das dann konkret hier:
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect Password:="Planung"
'copy total
lastrow = ws.Cells(ws.Rows.Count, "CK").End(xlUp).Row
For i = 16 To lastrow
ws.Range(ws.Cells(16, "CK"), ws.Cells(lastrow, "CK")).Copy
ws.Range("CL16").PasteSpecial xlPasteValues
Next i
' add formula in Act column after updating month
For j = 75 To 86
ws.Range(ws.Cells(16, "BV"), ws.Cells(lastrow, "BV")).Copy
If ws.Cells(14, j).Value = "ACT" Then
ws.Cells(16, j).PasteSpecial Paste:=xlPasteFormulas
End If
Next j
'add difference to Dec
Application.Calculation = xlCalculationAutomatic
ws.Range(ws.Cells(16, "CM"), ws.Cells(lastrow, "CM")).Copy
ws.Range("CO16").PasteSpecial xlPasteValues
ws.Range(ws.Cells(16, "CO"), ws.Cells(lastrow, "CO")).Copy
ws.Range("CH16").PasteSpecial xlPasteValues, xlPasteSpecialOperationAdd
ws.Range(ws.Cells(16, "CO"), ws.Cells(lastrow, "CO")).Clear
Application.Calculation = xlCalculationManual
Next ws
|