Perhaps
Range("N2").Resize(nRows).FormulaR1C1 = ...
... however you calculate nRows