ich stehe seit ca. 2 Stunden vor folgendem Problem:
Ich habe mir eine schöne Pivottabelle gebastelt und auch bedingte Formatierungen eingebaut. Als ich nun die Neuentdeckung "Datenschnitt einfügen" fand und zusätzlich eingebaut habe, musste ich feststellen, dass die bed. Formatierungen in einer Pivot nicht übernommen werden, sobald man die Filter benutzt. Meine Idee war einfach einen Button einzubauen, mit dem ich ein aufgezeichnetes Makro starte, dass dann jedesmal die bed. Formatierung neu ausführt. Problem bei der Ausführung: es wird nicht nur die eine gewünschte Spalte, sondern es werden alle Spalten formatiert... :-(
Hier der Code, vllt hat ja jemand eine Idee:
Sub Makro10()
' Makro10 Makro
Columns("N:N").Select
Range("N3").Activate
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=0,01", Formula2:="=1000"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="=-1000", Formula2:="=-0,01"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16752384
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13561798
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
End Sub
Danke und GrussFelix