View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default copy row to new sheet where cell value meets criteria

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

On Feb 13, 5:45 pm, djhs63 wrote:
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