Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi People
I'm trying to use the following macro to delete any rows that have a "0" in all cells that are in Column A - however whn I run the macro it does change the "0" to the word "delete" but doesn't delete the rows? Does anyone know what i'm doning wrong? Thanks! Sub delete() Application.ScreenUpdating = False Range("a1:a500").Select For Each Cell In Selection If Cell.Value = "0" Then Cell.Value = "delete" End If Next Cell Range("a1:a500").Select For Each Cell In Selection If Cell.Value = "delete" Then Cell.EntireRow.delete Next Cell Range("a1").Select Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
GET.CELL | Excel Worksheet Functions | |||
Excel - option to extend function in cell to column | Excel Worksheet Functions | |||
How do I convert the result of LARGE to the cell (or column) refe. | Excel Worksheet Functions | |||
How can I combine IF, COLUMN, and LARGE formulas in a single cell? | Excel Worksheet Functions | |||
How to populate column with formula based on value in cell | Excel Worksheet Functions |