AW: Schriftfarbe
26.02.2004 17:50:50
TE
ok. Dann müsstest Du jetzt entscheiden, wann das Makro ausgeführt werden soll: auf Knopfdruck, beim Blattaktivieren, bei jeder Zellwertänderung oder so. Letzteres kann lästig werden, wenn das Makro nicht so schnell ist;
ansonsten der reine Code:
Sub Prüfen()
Statzeile = Application.DisplayStatusBar
With Application
.DisplayStatusBar = True
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
PrüfWert = 162
lastrow = Cells(1, 3).End(xlDown).Row
For Z = 1 To lastrow
If Cells(Z, 3).Value = PrüfWert Then
Cells(Z, 3).EntireRow.Select
With Selection.Font
.FontStyle = "Fett"
.ColorIndex = 3
End With
Else
Cells(Z, 3).EntireRow.Select
With Selection.Font
.FontStyle = "Standard"
.ColorIndex = xlAutomatic
End With
End If
Application.StatusBar = "Überprüfe Zeile " & Z
Next Z
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.Calculate
.StatusBar = False
.DisplayStatusBar = Statzeile
End With
End Sub
wie gesagt, je nachdem, wann und wie das ding gestartet werden soll, muss das jetzt noch hingefummelt werden.
Gruss
TE