AW: Pivot und bedingte formatierung
19.06.2009 15:29:53
Julia
Klappt genial
Habs angepasst auf meine Verhältnisse aber irgendwie will er nicht ganz
Meine Pivot beginnnt bei Zelle A14
Also die Zahlen stehen in A14 abwärts
Habe dann deinen Code so geändert...
Die Zelle A14 macht er mir korrekt doch danach kommt fehler
An dieser Stelle:
Range(Cells(14, 1), Cells(LetzteZeile, 1)).Select
Der kompeltte Code sieht so aus:
Sub BedForm()
LetzteZeile = [G65536].End(xlUp).Row - 2
Columns("A:A").Select
Selection.FormatConditions.Delete
Range("A14").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLessEqual _
, Formula1:="0"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 2
End With
Selection.FormatConditions(1).Interior.ColorIndex = 3
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="1", Formula2:="14"
With Selection.FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 2
End With
Selection.FormatConditions(2).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
, Formula1:="14"
With Selection.FormatConditions(3).Font
.Bold = True
.Italic = False
.ColorIndex = 2
End With
Selection.FormatConditions(3).Interior.ColorIndex = 4
Range("A14").Select
Selection.Copy
Range(Cells(14, 1), Cells(LetzteZeile, 1)).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("I12").Select
Range("G3").Select
End Sub