I am trying to use formula or formulalocal in VBA but the following code snippets gives me a runtime error.
What am I doing wrong?
Code:
Worksheets("Test").Range("F10").Formula = "=IF(B4="All countires","*",B4)"
Worksheets("Test").Range("F10").Formula = "=IF(B4="All countires";"*";B4)"
Worksheets("Test").Range("F10").FormulaLocal = "=IF(B4="All countires";"*";B4)"
Worksheets("Test").Range("F10").FormulaLocal = "=IF(B4="All countires","*",B4)"
What am I doing wrong?