Excel: Autofill formula not working

Hello I am using the below auto fill code but for some reason it is not filling the formula to the last cell.

    ActiveCell.FormulaR1C1 = _
    Selection.AutoFill Destination:=Range("O1:O" & Range("A" & Rows.Count).End(xlUp).Row)
The code is suppose to auto fill the formula in column O down to the last cell of the sheet in accordance to the last cell in column A. Column A has data but the formula doesn't want to go down.

This question generated 17 answers. To proceed to the answers, click here.

This thread is current as of August 20, 2014.

For more resources for Microsoft Excel