AW: Farbiger Buchstaben einzeln
13.05.2008 16:18:00
Chris
Servus Thomas,
probiers mal in der Art:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CellInhalt As String, zahl As String
If Target.Address = "$I$4" Then
CellInhalt = ActiveCell.Value
Target.Value = RTrim(Target.Value)
If Left(Target.Value, Len(CellInhalt)) = CellInhalt And Right(Target.Value, 1) = "x" Or _
Right(Target.Value, 1) = "X" Then
zahl = Len(Target.Value)
With Target.Characters(Start:=zahl, Length:=1).Font
.ColorIndex = 3
End With
End If
End If
End Sub
Hier wird bei Eingabe in Zelle I4 der letzte Buchstabe, wenn x oder X rot gefärbt. Das Change-ereignis musst du, dann eben auf den gewünschten Bereich erweitern.
z.B.: If Not Intersect(Target,Range(A1:B10") is Nothing Then...
Gruß
Chris