versuch das mal:
Private Sub CommandButton1_Click()
Dim Wertung As Double
i = 2
M1 = Tabelle2.Cells(2, 3)
M2 = Tabelle2.Cells(2, 4)
M3 = Tabelle2.Cells(2, 5)
Do While IsEmpty(Tabelle1.Cells(i, 1)) = False
founda = True: foundb = True: foundc = True
MM1 = Tabelle1.Cells(i, 3)
MM2 = Tabelle1.Cells(i, 4)
MM3 = Tabelle1.Cells(i, 5)
If M1 <> "" And M1 <> MM1 And M1 <> MM2 And M1 <> MM3 Then founda = False
If M2 <> "" And M2 <> MM1 And M2 <> MM2 And M2 <> MM3 Then foundb = False
If M3 <> "" And M3 <> MM1 And M3 <> MM2 And M3 <> MM3 Then foundc = False
If (founda And foundb And foundc) Then
Tabelle2.Cells(i + 3, 1).Value = Tabelle1.Cells(i, 1).Value
'Wertung...
Else
Tabelle2.Cells(i + 3, 1).Value = 0
End If
i = i + 1
Loop
end sub
|