View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default translating formulas

Hi Luc,

I don't use a non-English version of Excel, so I don't 'know' about these
things, but I am assured by those in the know that FormulaLocal is a total
waste of time.

Here is a suggestion:
- create the CF formula in a cell in VB as normal
- create a CF condition and copy that formula over

Here is a sample piece of code that puts =A1SUM($B$1:$B$10) in I1, and then
sets that as the CF for A1. Just choose an unused cell somewhere

Sub SetCF()
Range("I1").Formula = "=A1SUM($B$1:$B$10)"
With Range("A1")
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:= _
Range("I1").Formula
.FormatConditions(1).Interior.ColorIndex = 38
End With
Range("I1).Value=""
End Sub

If you try it, please let me know if it works for you

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Luc Benninger" wrote in message
...
Hi Bob
Thanks for replying.
Think I must be a bit more specific:
I need the translate function to set the formula of a conditional
formatting. In my opinion formulas in a conditional format object must
be set in the local language. Isn't this right?
Luc

Bob Phillips wrote:
Luc,

Don't bother. Just enter the formula in VBA in English, and Excel should

do
it all for you.