0
条件付き書式を使っているだけでなく、多くのコピーと貼り付けを行っている人のように、私はいくつかのセルを貼り付けてコピーするので、私の考えは、条件付き書式をハードコードしてから、すべての書式をクリアして再適用するマクロを作成するだけだったということでした。ああ、VBAは今日私を憎むようです!VBA条件付きプログラミングの微妙なこと
しないのはなぜこの作品:
Sheets("Log").Cells.FormatConditions.Delete
With Range("D1:H63")
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=D1='Working')"
With .FormatConditions(.FormatConditions.Count)
.SetFirstPriority
With .Interior
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
End With
End With
End With
とき、私は上の別の場所から得たこの例SO行います。私はそのコードには二つの問題を参照
With Range("B3:H63")
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF($D3="""",FALSE,IF($F3>=$E3,TRUE,FALSE))"
With .FormatConditions(.FormatConditions.Count)
.SetFirstPriority
With .Interior
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
End With
End With
End With