Ich habe folgendes Problem:
Ich habe eine Liste mit folgenden Total-Zeilen:
"Total DG"
"Total VU"
"Total Service"
"Total Kundenschulung"
"Total Kundenversuch" und
"Total Engineering"
Die Zeilen Total DG und Total VU sollten einen blauen Hintergrund bekommen und fett werden (Mit einem Makro (analog der bedingten Formatierung) habe ich dies geschafft). à Schaue unten....
Nun möcht ich, dass alle Total-Zeilen, welche von Total DG und Total VU abweichen, eine orange Hintergrundfarbe bekommen.
Wie schreibe ich dies im Makro?
Danke im Voraus!!!
Sub Makro14()
Columns("A:F").Select
Selection.FormatConditions.Delete
'1. Bedingung
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A1=""Total DG"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(1).Interior.ColorIndex = 37
'2. Bedingung
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A1=""Total VU"""
With Selection.FormatConditions(2).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(2).Interior.ColorIndex = 37
'3. Bedingung
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A1=""Total Service"""
With Selection.FormatConditions(3).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(3).Interior.ColorIndex = 45
'4. Bedingung
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A1=""Total Kundenversuch"""
With Selection.FormatConditions(4).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(4).Interior.ColorIndex = 45
'5. Bedingung
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A1=""Total Kundenschulungen"""
With Selection.FormatConditions(5).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(5).Interior.ColorIndex = 45
'6. Bedingung
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$A1=""Total Engineering"""
With Selection.FormatConditions(6).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(3).Interior.ColorIndex = 45
Range("A1").Select
End Sub