Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete cells in row A with just zeroes
Here's one way:
Save a backup copy and test first. Adjust the parameters as needed. Sub FindNDelete() Dim rng As Range, cell As Range Dim strAddress1 As String, rngUnion As Range Set rng = Range("A:A") 'adjust to suit Set cell = rng.Find(0, _ LookIn:=xlValues, Lookat:=xlWhole) If Not cell Is Nothing Then strAddress1 = cell.Address Do If rngUnion Is Nothing Then Set rngUnion = cell Else Set rngUnion = Union(cell, rngUnion) End If Set cell = rng.FindNext(cell) Loop While Not cell Is Nothing And _ cell.Address < strAddress1 End If If Not rngUnion Is Nothing Then rngUnion.EntireRow.Delete End If End Sub For more info see www.rubbershoe.com/deleterows.htm. "Steven R. Berke" wrote in message om... I have a column of 4 digit numbers located in Row A that covers about 60 rows. At the bottom of the 4 digit numbers in row A are about 30 rows of zeroes. To the right of the zeroes are blank cells (column B). To the right the cells of the four digit numbers above the zeroes is information. Have you any suggestions as to how I can delete the rows with just zeroes in column A without deleting any of the others numbers in the rows above zeroes which may contain information. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete cells column. Delete empty cells | Excel Worksheet Functions | |||
Can I set the default for "show zeroes" to not show the zeroes? | Setting up and Configuration of Excel | |||
Format cells in web query (leading zeroes) | Excel Discussion (Misc queries) | |||
A fixed field format needs fronting zeroes for each cells value. | Excel Worksheet Functions | |||
How do I format data cells in Excel to keep leading zeroes? | Setting up and Configuration of Excel |