Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy Rows using criteria
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatically copy rows based on criteria | Excel Discussion (Misc queries) | |||
Copy rows to another sheet. Criteria = cells in column H is not em | Excel Programming | |||
Copy rows that meet a certain criteria | Excel Programming | |||
copy rows meeting criteria to another worksheet | Excel Worksheet Functions | |||
Copy Rows if Lookup Criteria Match | Excel Discussion (Misc queries) |