Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Both of those worked. Thanks so much.
"Bob Phillips" wrote: Public Sub ProcessData() Dim i As Long Dim LastRow As Long With ActiveSheet LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = LastRow To 1 Step -1 If .Cells(i, "E").Value = 0 And .Cells(i, "F").Value = 0 Then .Rows(i).Delete End If Next i End With End Sub -- __________________________________ HTH Bob "aileen" wrote in message ... I have a document with 6 columns of data and an unspecified number of rows. I would like a macro to delete any row that has both columns 5 and 6 equal to 0. I would then need every other row to move up or down so there are no blank rows. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
delete part of a row based on certain criteria | Excel Worksheet Functions | |||
Macro to delete row based on criteria (first few characters of string) | Excel Programming | |||
Delete rows based on criteria | Excel Discussion (Misc queries) | |||
Delete rows based on certain criteria | Excel Discussion (Misc queries) | |||
Cut and Paste macro based on criteria then delete empty rows | Excel Programming |