Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Is there a way to create a macro that will search a section of a worksheet
and delete rows that have a zero in the leading cell? Thanks in advance! |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub DeleteRowswithZeroInColumnA()
Dim lastrow as Long, i as Long lastrow = cells(rows.count,1).End(xlup).Row for i = lastrow to 2 step -1 if cells(i,1).Value = 0 then rows(i).Delete end if Next End Sub -- Regards, Tom Ogilvy "pywhacket" wrote: Is there a way to create a macro that will search a section of a worksheet and delete rows that have a zero in the leading cell? Thanks in advance! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
How do i create a macro that saves the filename that is equal to a cell in the sheet? | Excel Discussion (Misc queries) | |||
Delete Row Macro - if cell $5000 | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
macro help | Excel Discussion (Misc queries) |