Home » excel » How to combine FormulaArray and FormulaLocal options in Excel VBA?

How to combine FormulaArray and FormulaLocal options in Excel VBA?

Posted by: admin April 23, 2020 Leave a comment

Questions:

I am sending functions inside VBA code to the cells with a VBA-code line like below:

Sheets("Sheet1").Range("B2").FormulaLocal = "=somefunctions_in_local_language"

I am using FormulaLocal option because the functions in cells are in the local language, not in English.

Now I want to send array functions, and I am supposed to use FormulaArray to do this. However, even the array functions will be in the local language. I guess I am supposed to combine both FormulaArray and FormulaLocal somehow, but how?

I tried to find if there is something like FormulaArrayLocal, but there is not such a thing. So any idea?

How to&Answers:

That link didn’t give a direct answer, but I did find a solution:

Sheets("Sheet1").Range("B2").FormulaLocal = "=somefunctions_in_local_language"
Sheets("Sheet1").Range("B2").FormulaArray = Sheets("Sheet1").Range("B2").Formula

It should only be .Formula in the second line. If you use .FormulaLocal, then you get an error.