Function used in conditionnal formating not using good language...

P

Pascal.Landry

Hi,

I've created a workplan in Excel 2003 sp3. Each line is conditionnaly
formatted using the status of the activity it contains.

EX :
Activity... ...status...
Wash the floor... Do do...

When the activity is not yet processed, it is not formatted, when it is done
without problem it is formatted in green, when it has been delayed it is
yellow and when there is a problem, it is formatted in red.

This does not make any error.

My problem is : when I add a formula in the condition. For exemple, if I
want to format line in yellow if the activity has been cancelled or when it
is delayed.

Then the second condition become something like this :
Type:=xlExpression, Formula1:= "=OR($H10=""Completed"";$H10=""Already done"")"

Some other person than me can use my file and they don't nessary have the
same setting then I have. For exemple, some of them have a French version of
Excel running (still 2003 sp3 though).

In that case, if they go in conditionnal formating window, they see :
=OR($H10="Completed";$H10="Already done")
instead of
=OU($H10="Completed";$H10="Already done")

Notice : OR vs OU (English vs French)

By typing "OU" themselve the function is working properly.

I actually use a use a function like this to update the conditions
automatically :


Sub UpdateConditionnalFormating()
Dim i As Integer

Application.Calculation = xlCalculationManual
Application.DisplayAlerts = False
Application.ScreenUpdating = False

For i = 9 To Range("D65536").End(xlUp).Row + 1
Range("C" & i & ":J" & i).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=OR($H" & i & "=""Complété"";$H" & i & "=""Déjà fait"")"
Selection.FormatConditions(1).Interior.ColorIndex = 4
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=OR($H" & i & "=""Sauté"";$H" & i & "=""À ne pas faire"")"
Selection.FormatConditions(2).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$H" & i & "=""Échoué"""
Selection.FormatConditions(3).Interior.ColorIndex = 3
Next

Application.Calculation = xlCalculationAutomatic
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Is there any way to make it working without having to run that macro on the
opening of the file ??

Thanks a lot !
 
P

Pascal.Landry

Hi !

Nobody has a clue on this issue ? It appears that even with the procedure at
the opening of the file i may have a problem when using a different language
than the one I used to create the file.

Thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top