ich bekomme bei nachfolgendem Code einen Fehler 2023 in der rng Variable.
Kann mir jemand weiterhelfen was da falsch läuft!
Sub Übertrag()
Dim i, Row_Pos, Col_Pos as Integer
Dim Suche, rng as Variant
For i = 1 To 200
Cells(702, 1) = Cells(703 + i, 1)
For Each rng In [C702:DF2200]
Suche = Cells(702, 2)
If rng.Value = Suche Then
Row_Pos = rng.Row
Col_Pos = rng.Column
Cells(Row_Pos, Col_Pos - 1).Value = "FzgCode"
Cells(Row_Pos + 1, Col_Pos - 1).Value = "WartungGr"
Cells(Row_Pos + 1, Col_Pos).Value = Cells(702, 125)
Cells(Row_Pos + 2, Col_Pos - 1).Value = "RwGr"
Cells(Row_Pos + 2, Col_Pos).Value = Cells(702, 158)
Cells(Row_Pos + 3, Col_Pos - 1).Value = "AnPaGr"
Cells(Row_Pos + 3, Col_Pos).Value = Cells(702, 192)
Cells(Row_Pos + 4, Col_Pos - 1).Value = "FzgGr"
Cells(Row_Pos + 4, Col_Pos).Value = Cells(702, 205)
GoTo Sprungmarke1
End If
Next rng
Sprungmarke1:
Next i
End Sub