für die Hilfe aller in den letzten 14 Tagen vielen Dank.
Heute habe ich noch ein Problem und die Hoffnung, dass jemand so nett ist, und mir weiter hilft.
Mit dem Makro wird eine bedingte Formatierung in den Bereich F7 bis AJ 300 geschrieben.Das funktioniert problemlos.
Ich möchte den Bereich variabel halten. Die bedingte Formatierung soll jeweils im Bereich F7:AJ bis zur letzten beschriebenen Zelle in Spalte B geschrieben werden. Was muss ich da und wie ändern?
'wochentage formate schrift und füllung gleich
Application.ScreenUpdating = False
With Range("F7:AJ300")
.FormatConditions.Add Type:=xlExpression, Formula1:="=F7="""""
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.249946592608417
End With
.FormatConditions(1).StopIfTrue = False
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=WOCHENTAG(F$6)=7"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
.FormatConditions(1).StopIfTrue = False
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=WOCHENTAG(F$6)=1"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.349986266670736
End With
.FormatConditions(1).StopIfTrue = False
End With
Vielen Dank und liebe Grüße
Gisela