Sub CopyToSheet5()
Dim ws1 As Worksheet, ws2 As Worksheet
Set ws1= ThisWorkbook.Sheets("Antragserfassung") Set ws2= ThisWorkbook.Sheets("Anträge bis 1.500")
lastRow=ws1.Cells (ws1.Rows.Count, "W").End(xlUp).Row For i = 2 To lastRow
If ws1.Cells(1, 23).Value < 1500 Then ws2.Cells (ws2.Cells (ws2.Rows.Count, "A").End(xlUp).Row+ 1, 1).Value = ws1.Cells(1, 3).Value
End If
Next i
End Sub
Warum kommt bei End if immer eine Fehlermeldung das kein if Block findet
|