I have a macro that does this:
ActiveCell.FormulaR1C1 = "=COVAR(" & ticker & "!I:I," & MarketIndex & "!I:I)/VARP(" & MarketIndex & "!I:I)"
Which inserts this:
=COVAR(BMY!I:I,GSPC!I:I)/VARP(GSPC!I:I)
But it shows up as #NAME? until I click on the cell to show the formula and I press enter. Why doesn’t it automatically run without intervention?
You are trying to assign a
A1style reference to aR1C1style property, you can’t mix these types.Either use
Or