Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a row based on more than one condtion
I am using the following code to delete a row in a spreadsheet based
on the value (zero) in that row: Sub RemoveZero() Dim RngColAB As Range Dim c As Long Application.ScreenUpdating = False Set RngColAB = Range("AB2", Range("AB" & Rows.Count).End(xlUp)) For c = RngColAB.Count To 1 Step -1 RngColAB(c).Value = Application.Trim(RngColAB(c)) If RngColAB(c).Value = 0 Then _ RngColAB(c).EntireRow.Delete Next c Application.ScreenUpdating = True End Sub How can I modify it so that it looks to two columns where both rows have to have a zero value so that the row can be deleted? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
condtion for entering date | Setting up and Configuration of Excel | |||
delete row based on value of ... | New Users to Excel | |||
How to reset Excel 2002 to first run condtion | Excel Discussion (Misc queries) | |||
sumif with 2 condtion | Excel Worksheet Functions | |||
delete based on | Excel Discussion (Misc queries) |