bedingte formatierungibmn vba - syntax
09.08.2025 15:50:03
zdenek fajfrlik
ich habe ein interessantes problem:
wie wäre die syntax für den bezug $Z$6 in der formel, wenn ich sowohl zeile als auch spalte in cells(z,s) ausdrücken möchte ?
ich komme nicht drauf....
das makro läuft zeilen durch und bereitet die bedingte formatierung für die union-cells, falls der user in einer zelle einen wert eingibt.
die formatierung soll dan je zeile reagieren.
Union(Range(Cells(Z, shift_spalte + 5), Cells(Z, shift_spalte + 6)), Range(Cells(Z, shift_spalte + 8), Cells(Z, shift_spalte + 8))).Select
range (cells(z, shift_spalte),cells(z, shift_spalte)).activate
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$Z$6>"""""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 49407
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
vielen dank!
stan
Anzeige