Wenn ein treffer gefunden ist in (Spalte 3)in beide Tabellen, dann sollte: von ws2 spalte L, die betroffene treffer, wo der Wert "NEIN "steht ,
in Spalte AY in ws1, "F" geschrieben sein.
Das code finktioniert .,zeigt aber keine Fehlermeldung und auch keine Ergebnisse in Spalte AY.
Was könnte Falsch sein?
Grüße, Zoi
Sub Update()
Dim i As Long, lastrow As Long, findZeile As Long
Dim wb1 As Workbook, wb2 As Workbook
Dim ws1 As Worksheet, ws2 As Worksheet
Dim treffer As Object
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set wb1 = ThisWorkbook
Set ws1 = wb1.Sheets("Aktuell")
Set wb2 = Workbooks.Open("H:\Update.xlsx")
Set ws2 = wb2.Sheets("Sheet1")
lastrow = ws2.Range("C" & Rows.Count).End(xlUp).Row
For i = 3 To lastrow
Set treffer = ws1.Columns(3).Find(ws2.Cells(i, 3), LookIn:=xlValues)
If Not treffer Is Nothing Then
findZeile = treffer.Row
If ws2.Cells(i, "L") = "NEIN" Then
ws1.Cells(findezeile,"AY").Value ="F"
Else
End If
End If
Set treffer = Nothing
Next i
'wb2.Close savechanges:=True
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
End Sub