Ich habe nun folgendes Problem, dass ich noch !2! weitere Ebenen dazu programmieren muss (insgesamt 5). Dies ergibt aufgrund des Potenzierens eine extrem hohe Anzahl an Variablen. Gibt es die Möglichkeit dies evtl. mit Variablen mit mehreren Werten zu kürzen? Vielen Dank.
Bsp.:
3.34.555.66.33
2.111.22.333
333.4.333.22.2
7.555.44.555
Hier ein Teil aus dem Code
Sub ()
'******************************************drei Ebenen
For i = 3 To 1000
If Cells(i, 1) Like "#.#" _
Or Cells(i, 1) Like "#.##" _
Or Cells(i, 1) Like "#.###" _
Or Cells(i, 1) Like "##.#" _
Or Cells(i, 1) Like "##.##" _
Or Cells(i, 1) Like "##.###" _
Or Cells(i, 1) Like "###.#" _
Or Cells(i, 1) Like "###.##" _
Or Cells(i, 1) Like "###.##" Then
For m = 0 To 1000
If Cells(i + 1 + m, 1) Like "#.#" _
Or Cells(i + 1 + m, 1) Like "#.##" _
Or Cells(i + 1 + m, 1) Like "#.###" _
Or Cells(i + 1 + m, 1) Like "##.#" _
Or Cells(i + 1 + m, 1) Like "##.##" _
Or Cells(i + 1 + m, 1) Like "##.###" _
Or Cells(i + 1 + m, 1) Like "###.#" _
Or Cells(i + 1 + m, 1) Like "###.##" _
Or Cells(i + 1 + m, 1) Like "###.###" Then
Exit For
End If
If Cells(i + 1 + m, 1) Like Cells(i, 1) & ".#" _
Or Cells(i + 1 + m, 1) Like Cells(i, 1) & ".##" _
Or Cells(i + 1 + m, 1) Like Cells(i, 1) & ".###" Then
'Ereignis A
End If
Next m
If t = 1 Then
'Ereignis B
End If
End If
Next i
End Sub
Vielen Dank.Gruß
Albert