AW: variable Striche - aber wie?
29.11.2005 12:30:21
Lupo
Danke u_,
ist es richtig, ich soll einen Maximalbereich bed. formatieren "wenn gefüllt"? Habe schon 3 Farbformatierungen für den Bereich. Aber wie passe ich die zeilenweise Punktlinien hier ein? Der Bereich Format2 ist der Max.Wert - soll aber nur, solange in "F" etwas steht. Kannst Du da weiterhelfen? Wäre prima!!
Habe:
Sub bedingt_Format2()
' Textzeilen bedingte Formatierung Rot, Blau, Schwarz
Application.Goto Reference:="Format2"
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$F5=""2x/Woche"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 3
End With
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$F5=""1x/Woche"""
With Selection.FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 5
End With
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$F5=""1x/Monat"""
With Selection.FormatConditions(3).Font
.Bold = True
.Italic = False
.ColorIndex = 1
End With
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("D5").Select
End Sub