Write a formula in an Excel Cell using VBA

后端 未结 5 630
Happy的楠姐
Happy的楠姐 2020-12-11 01:01

I\'m trying to use VBA to write a formula into a cell in Excel. My problem is that when I use a semicolon (;) in my formula, I get an error:

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 01:20

    Treb, Matthieu's problem was caused by using Excel in a non-English language. In many language versions ";" is the correct separator. Even functions are translated (SUM can be SOMMA, SUMME or whatever depending on what language you work in). Excel will generally understand these differences and if a French-created workbook is opened by a Brazilian they will normally not have any problem. But VBA speaks only US English so for those of us working in one (or more) foreign langauges, this can be a headache. You and CharlesB both gave answers that would have been OK for a US user but Mikko understod the REAL problem and gave the correct answer (which was also the correct one for me too - I'm a Brit working in Italy for a German-speaking company).

提交回复
热议问题