copy row to new sheet where cell value meets criteria

D

djhs63

Please can you help me to define a macro to copy all rows in worksheet1 where
cell Ax does not contain value zero to worksheet2
 
V

vezerid

Sub CopyNonZero()
Dim v
j = 1
For i = 1 to 65536
If Sheets("Sheet1").Cells(i,1) <> 0 Then
v = Sheets("Sheet1").Cells(i,1).EntireRow
Sheets("Sheet2").Cells(j,1).EntireRow = v
j = j + 1
End If
Next i
End Sub

HTH
Kostis Vezerides
 
Top