I have below vba code to put a formula in cell AE3 then copy down to last row, i have 5000+ rows but wonder why it take so long to process (about 5 min. and still running), is there a better way to do this? i want copy down to last row as the list is dynamic data with different ranges every day. Thanks.
 Sub FillRows()
 Dim col_AE As String
 Sheet1.Select
col_AE = "=IFERROR(INDEX(setting!C[-17],MATCH(smart!RC[-9],setting!C[-18],0)),"""")"
 If col_AE <> vbNullString Then
    For j = 3 To Range("A" & Rows.Count).End(xlUp).Row - 1
        If Range("ae" & j).Value = vbNullString Then
            Range("ae" & j).Value = col_AE
        End If
    Next j
   End If
End Sub