I was trying to use formulaR1C1 function calculate as below:
MyCount = Application.Count(Range("A:A")) + 4
ActiveCell.FormulaR1C1 = _
"=IF(AND(R[2]C=""Adj Close"", R[MyCount]C<?XML:NAMESPACE PREFIX = MIN(R[3]C /><MIN(R[3]C:R[MyCount R[MyCount]C Close??, Adj IF(AND(R[2]C="" ??sell??, 1]C)), ->MAX(R[3]C:R[MyCount - 1]C)), ""buy"", """"))"
It gave error of "Application defined or object defined error" when I put "MyCount" instead of numbers into the brackets after "R". Does that mean, only numbers are accepted in this FormulaR1C1 function? Is there any other method can help me to do the calculation?
Thank you,
Rachel
</MIN(R[3]C:R[MyCount>
MyCount = Application.Count(Range("A:A")) + 4
ActiveCell.FormulaR1C1 = _
"=IF(AND(R[2]C=""Adj Close"", R[MyCount]C<?XML:NAMESPACE PREFIX = MIN(R[3]C /><MIN(R[3]C:R[MyCount R[MyCount]C Close??, Adj IF(AND(R[2]C="" ??sell??, 1]C)), ->MAX(R[3]C:R[MyCount - 1]C)), ""buy"", """"))"
It gave error of "Application defined or object defined error" when I put "MyCount" instead of numbers into the brackets after "R". Does that mean, only numbers are accepted in this FormulaR1C1 function? Is there any other method can help me to do the calculation?
Thank you,
Rachel
</MIN(R[3]C:R[MyCount>