(Solved) – overriding the resulted rows, while pasting rows to destination sheet

(solved)-–-overriding-the-resulted-rows,-while-pasting-rows-to-destination-sheet

The following code run perfectly which was suggested by a helpful user, but overwrites the result (rows) and displays only last copied rows to the destination sheet.
Please suggest modification in the code.

    Sub Selectrows()
    Dim lastrow As Long
    Dim cel As Range
    Dim destSht As Worksheet

    Set destSht = Worksheets("VERTDEST") 

    With Worksheets("VERTALL")
     lastrow = .Range("E" & .Rows.Count).End(xlUp).Row 
     For Each cel In .Range("H4:H" & lastrow).SpecialCells(xlCellTypeFormulas, xlNumbers)
       If cel.Value >= 2.5 Then cel.Offset(-1, 0).Resize(3, 1).EntireRow.Copy Destination:=destSht.Cells(destSht.Rows.Count, 1).End(xlUp).Offset(3)
       Next
    End With
End Sub

Snapshot my sheet looks like this

Leave a Reply

Your email address will not be published. Required fields are marked *