[ACCEPTED]-Write a formula in an Excel Cell using VBA-excel
You can try using FormulaLocal property 2 instead of Formula. Then the semicolon should 1 work.
The correct character to use in this case 1 is a full colon (
:), not a semicolon (
The correct character (comma or colon) depends 4 on the purpose.
,) will sum only the 3 two cells in question.
:) will sum 2 all the cells within the range with corners 1 defined by those two cells.
Treb, Matthieu's problem was caused by using 16 Excel in a non-English language. In many 15 language versions ";" is the correct separator. Even 14 functions are translated (SUM can be SOMMA, SUMME 13 or whatever depending on what language you 12 work in). Excel will generally understand 11 these differences and if a French-created 10 workbook is opened by a Brazilian they will 9 normally not have any problem. But VBA speaks 8 only US English so for those of us working 7 in one (or more) foreign langauges, this 6 can be a headache. You and CharlesB both 5 gave answers that would have been OK for 4 a US user but Mikko understod the REAL problem 3 and gave the correct answer (which was also 2 the correct one for me too - I'm a Brit 1 working in Italy for a German-speaking company).
More Related questions