AW: Alte Einträge (Dateinamen) farbig darstellen?
21.09.2008 18:04:00
Hajo_Zi
Hallo Selma,
hier mal eine Lösung, es wird nur die erste Datei markiert, falls die Datei öffters in der Liste ist.
Option Explicit
Sub Selma()
Dim LoLetzte As Long
Dim Loi As Long
Dim RaFound As Range
LoLetzte = IIf(IsEmpty(Cells(Rows.Count, 1)), Cells(Rows.Count, 1).End(xlUp).Row, Rows. _
Count)
For Loi = 5 To LoLetzte
If InStr(UCase(Cells(Loi, 1)), "_NEU") > 1 And InStr(UCase(Cells(Loi, 1)), ".DOC") > 1 _
Then
With ActiveSheet
Set RaFound = .Range("A1:A" & LoLetzte).Find(Replace(UCase(Cells(Loi, 1)), " _
_NEU", ""), _
.Range("A" & LoLetzte), , xlWhole, , xlNext)
If Not RaFound Is Nothing Then
RaFound.Interior.ColorIndex = 3
End If
End With
End If
Next Loi
End Sub
Gruß Hajo