Jam
Jam

Reputation: 197

International macros in Excel

I'm trying to create an international Excel macro sheet. These macros should work for many countries

I'm writing formulas in English using Range.formula, but it does not work for all formulas (?)

For example, I create

Range("D4").Formula = "=SUM(D7:D14)"

In Spanish Excel it works so is filled with "=SUMA(D7:D14)". Is correct

Other formulas fails, for example:

"=IF(R2=8;D7;D6)"                  'In Spanish Excel I get error 1004

"=ISNUMBER(O2)" works =ESNUMERO(O2)

"=PRODUCT(O2;O3)" Does not work,  error 1004  

I'm with Excel 2010 and Windows 7 , and I cannot understand this strange behavior. Parameters are valid for all formulas

Any ideas?

Upvotes: 3

Views: 665

Answers (1)

Axel Richter
Axel Richter

Reputation: 61870

Range.Formula expects English formula notation. This means not only English function names but also using comma to separate parameters and not semicolon.

So

...Formula = "=IF(R2=8,D7,D6)"

and

...Formula = "=PRODUCT(O2,O3)"

should work.

Upvotes: 3

Related Questions