Copy Rows using criteria
Try this:
Sub Copy()
Dim lRow As Long, rng As Range, i As Range
lRow = Range("C65536").End(xlUp).Row
Set rng = Range(Cells(1, 3), Cells(lRow, 3))
a = 1
For Each i In rng
If i.Value < "0" Then
i.EntireRow.Copy Sheets(2).Rows(a)
a = a + 1
End If
Next i
End Sub
--
Dan
On Dec 17, 10:46 am, Carpe Diem wrote:
Hi ,
I have a data with about 4500 rows and 12 columns. I would like to
copy only the rows where column C haven't "0" value.can someone hep me
with a macro ?
Example
Thank you
|