diese bedingten Formatierungen möchte ich auf bestimmte Tabellenblätter anwenden, um sie in Abständen zu erneuern; z.B. mit
For a = 4 To 5 'in der Realität ca 30 Blätter -folgen alle aufeinander
oder Array
Sheets(Array("Finale_Projektierung", "Definition"))
Beispieldatei:
https://www.herber.de/bbs/user/109576.xlsm
Das bisherige Makro (in Modul "BedingteFormatierungen") stammt überwiegend vom Makrorecorder, ich muss es immer 30x durchführen:
Sub Gold_Kunden()
If ActiveSheet.FilterMode Then ActiveSheet.ShowAllData
Columns("A:O").EntireColumn.Hidden = False
Cells.FormatConditions.Delete
Range("A6:H49").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$D6=""x"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13431551
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
ActiveCell.Range("A1:L49").Select
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$n6=""na"""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.249977111117893
End With
Selection.FormatConditions(1).StopIfTrue = False
Range("D1").Select
End Sub
Kann mir jemand helfen? Vielen Dank und beste Grüße
Margarete