Formel:
=WENN(ODER(B20=$I$20;B20=$J$20;B20=$K$20;B20=$L$20);"Flug";WENN(ODER(B20=$I$21;B20=$J$21;B20=$K$21; B20=$L$21);"Fahrt";""))
Jetzt wollte ich das per Makro lösen, aber irgendwie habe ich da noch einen Denkfehler drin. Kann mir da bitte jemand weiter helfen?Private Sub Test()
Dim s As Integer
Dim z As Integer
With Sheets("Blatt1")
For z = 20 To .Cells(.Rows.Count, 2).End(xlUp).Row
For s = 9 To 12
If .Cells(z, s).Value "" Then
If .Cells(z, 2).Value = .Cells(20, s)
.Cells(z, 2).Value = "Flug"
Else
If .Cells(z, 2).Value = .Cells(21, s)
.Cells(z, 2).Value = "Fahrt"
End If
End If
Next s
End If
End With
End Sub