wo wird denn in diesem Code der Suchbegegriff abgelegt. Ich möchte nach jeder Zeile die "alten" bzw. gemerkten Suchbegriffe wieder löschen um jede Zeile einzeln zu behandeln. Aktuell merkt sich das Programm alle Suchbegriffe und erkennt alle Doppelten im Suchbereich.
For Each Zelle In rngSuche
If Not IsEmpty(Zelle) And (Zelle.Font.ColorIndex = 3 Or Zelle.Font.ColorIndex = 10) Then
Doppelt = False
For i = 1 To colGefunden.Count
If Zelle.Value = colGefunden(i) Then 'And Not (Cells(Zelle.Row) = t) Then
Doppelt = True ' Doppelte gefunden
'MsgBox ("Doppelt : " & Zelle.Value & "Zeile :" & t)
End If
Next i
If Doppelt = False Then
anzRote = anzRote + 1
colGefunden.Add Zelle.Value
End If
End If
'
If j Mod 7 = 0 Then
'Am Ende jeder Zeile wird die Anzahl roter Zellen in die entsprechende
'Spalte von Tabelle2 geschrieben
Sheets("Belegungsplan").Cells(Zelle.Row, 27) = anzRote ' Spalte AA
Sheets("Belegungsplan").Cells(Zelle.Row, 28) = anzRote ' Spalte AB
anzRote = 0
'
'Cells(Zelle.Row) = t
t = t + 1
End If
j = j + 1
Next Zelle
Sheets("Belegungsplan").Activate
Application.ScreenUpdating = True
'MsgBox "Anzahl roter Texte: " & colGefunden.Count
End Sub
Ich hoffe Ihr könnt mir weiterhelfen
Danke Gruß
markus