Take a look at using Tables, instead of your code. Tables automatically copy formulas down when you start typing data into a new row