Hello Guys,
This is my first post to the form.
I am trying to do following:
1. Sheet 1 has main data with formulas starting from row 8
2. I want to select the rows based on the values in column H (numeric value should be >0)
3. Copy the entire row and paste in sheet 2, starting from first empty row and then to subsequent rows without keeling any rows blank.
This is what I have written but is not working:
Sub Generate_Result()
Dim i, LastRow
LastRow = Sheets("Sheet 1").Cells(Rows.Count, 1).End(xlUp).Row
Sheets("Sheet2").Range("A3:T500").ClearContents
For i = 8 To LastRow
If Sheets("BoQ_Structure").Cells(i, "H").Value > 0 Then
Sheets(“Sheet1″).Cells(i, “H”).EntireRow.Copy Destination:=Sheets(“Sheet2″).Range(“A” & Rows.Count).End(xlUp).Offset(1)
End If
Next i
End Sub
Bookmarks