Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I delete rows programmatically based on certain criteria?
I have a large dataset in Microsoft Excel 2003 with almost 3000 lines and
I want to delete the rows of it, which have nulls in one or more of their columns. e.g. A B C D 1 2 3 4 1 4 5 2 3 4 Result : The 2nd and 3rd rows will be deleted or someway discarded. How can I do this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I delete rows programmatically based on certain criteria?
Sub marine()
For i = 100 To 1 Step -1 If IsEmpty(Cells(i, "D")) Then Cells(i, "D").EntireRow.Delete End If Next End Sub Adjust the 100 to meet your needs -- Gary''s Student gsnu200709 "nt_artagnian" wrote: I have a large dataset in Microsoft Excel 2003 with almost 3000 lines and I want to delete the rows of it, which have nulls in one or more of their columns. e.g. A B C D 1 2 3 4 1 4 5 2 3 4 Result : The 2nd and 3rd rows will be deleted or someway discarded. How can I do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete Rows based on criteria in excel | Excel Discussion (Misc queries) | |||
How can I delete rows programmatically based on certain criteria? | New Users to Excel | |||
How can I delete rows programmatically based on certain criteria? | Excel Worksheet Functions | |||
Delete rows based on criteria | Excel Discussion (Misc queries) | |||
Delete rows based on certain criteria | Excel Discussion (Misc queries) |