Hi there,
I have 2 questions regarding conditional formatting via VBA with Excel 2003
With this code one can add a conditional format to cell A1
But what if I want to apply this to a range that's changing all the time.
I mean the first pass is e.g. range R3 to R100, the next pass is T3 to T53, and so on...
I tried with "Formula1R1C1" instead of "Formula1" and then a range via variables, just like in cells, but it didn't work
--------------------------------------------------------------------------------------
The second problem is the "IsError" in the formula.
It works on a UK/US Excel but not on a Dutch version. In that case I have to use "IsFout".
UK formulas can be read by Dutch Exel but not conditional formatting ?!?!
Is this right, or do I do something wrong??
Thanks for any suggestion
I have 2 questions regarding conditional formatting via VBA with Excel 2003
With this code one can add a conditional format to cell A1
Code:
With .Range("A1")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=IsError(A1)"
.FormatConditions(1).Font.ColorIndex = 2
End With
But what if I want to apply this to a range that's changing all the time.
I mean the first pass is e.g. range R3 to R100, the next pass is T3 to T53, and so on...
I tried with "Formula1R1C1" instead of "Formula1" and then a range via variables, just like in cells, but it didn't work
--------------------------------------------------------------------------------------
The second problem is the "IsError" in the formula.
It works on a UK/US Excel but not on a Dutch version. In that case I have to use "IsFout".
UK formulas can be read by Dutch Exel but not conditional formatting ?!?!
Is this right, or do I do something wrong??
Thanks for any suggestion