Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
if a cell equal to zero how can it delete entire row
if a cell equal to zero how can we formulate it to delete the entire row
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
if a cell equal to zero how can it delete entire row
For only a single cell, say cell Z100:
Sub demo() If Range("Z100").Value = 0 Then Range("Z100").EntireRow.Delete End If End Sub For a range of cells, say all the cells in column Z Sub demoi() n = Cells(Rows.Count, "Z").End(xlUp).Row For i = n To 1 Step -1 If Cells(i, "Z").Value = 0 Then Cells(i, "Z").EntireRow.Delete End If Next End Sub -- Gary''s Student - gsnu200730 "yehia" wrote: if a cell equal to zero how can we formulate it to delete the entire row |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Specify a row based on data from a cell to delete entire row..... | Excel Discussion (Misc queries) | |||
Delete entire row based on cell color | Excel Programming | |||
can I delete entire row if adjacent cell formats differ? | Excel Worksheet Functions | |||
macro to find date format in a cell and delete that entire row | Excel Programming | |||
Delete entire row based on cell content | Excel Programming |