Efficient Loops in VBA
<p>I have written a VBA Macro which works, but takes too long because the database is also very big. 
I know this can be optimized via Arrays, but I am not sure how to make it. 
Could someone help me please?</p>

<pre><code>'Identify how many rows are in the file
 finalrow = ActiveSheet.Cells(Rows.Count, 6).End(xlUp).Row

'fill the empty fields which requires the part number and description
For i = 2 To finalrow
    If Cells(i, 3) = 0 Or Cells(i, 3) = "------------" Or Cells(i, 3) = "e" Or Cells(i, 3) = "111)" Or Cells(i, 3) = "ion" Then
        If Cells(i, 4) = 0 Or Cells(i, 4) = "-----------" Or Cells(i, 4) = "Location" Then
            Range("A" &amp; i &amp; ":H" &amp; i).Select
            Selection.Delete Shift:=xlUp
            i = i - 1
            Else
                For j = 1 To 3
                    Cells(i, j) = Cells(i - 1, j)
                Next
        End If
    End If
    If Cells(i, 1) = 0 Then
        Cells(i, 1) = Cells(i - 1, 1)
    End If

    If Cells(i, 4) = 0 Then
            Range("A" &amp; i &amp; ":H" &amp; i).Select
            Selection.Delete Shift:=xlUp
            i = i - 1
    End If

    Count = Count + 1
    If Count = finalrow Then
        i = finalrow
    End If
Next
</code></pre>