Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet where I am comparing 2 cells, the result is placed in
Cell AQ, if the value in that cell is 0, I would like the row to be deleted, How would I achieve this Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteZeros()
Dim rw as Long, i as Long, rng as Range set rw = cells(row.count,"AQ").end(xlup) for i = rw to 1 step -1 set rng = cells(i,"AQ") if rng < "" then if rng.Text = "0" then rng.EntireRow.delete end if end if Next End Sub -- Regards, Tom Ogilvy "Nigel" wrote in message ... I have a spreadsheet where I am comparing 2 cells, the result is placed in Cell AQ, if the value in that cell is 0, I would like the row to be deleted, How would I achieve this Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I remove extra blank lines in a column when I print? | Excel Discussion (Misc queries) | |||
Macro not recognizing blank lines as blank | Excel Discussion (Misc queries) | |||
Remove blank lines between records | Excel Discussion (Misc queries) | |||
remove blank lines from an entire spreadsheet | Excel Worksheet Functions | |||
how to automatically insert blank lines in between non-blank lines | Excel Programming |