Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to clear the contents in all rows except rows with
the word "ALL" in it. Can someone help? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Tester9()
Dim rng As Range Dim fAddr As String Columns(1).Insert Set rng = Cells.Find("All", AFter:=Range("IV65535"), _ LookIn:=xlValues, LookAt:=xlPart) If Not rng Is Nothing Then fAddr = rng.Address Do Cells(rng.Row, 1).Value = "X" Set rng = Cells.FindNext(rng) Loop While rng.Address < fAddr Else ActiveSheet.UsedRange.Rows.Delete Columns(1).Delete Exit Sub End If Set rng = Columns(1).SpecialCells(xlBlanks) rng.EntireRow.Delete Columns(1).Delete End Sub -- Regards, Tom Ogilvy "Mighvik" wrote in message ... I need to clear the contents in all rows except rows with the word "ALL" in it. Can someone help? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clear Contents | Setting up and Configuration of Excel | |||
Clear Contents | Excel Discussion (Misc queries) | |||
Clear Contents Macro | Excel Worksheet Functions | |||
Clear Contents But Not Formula | Excel Discussion (Misc queries) | |||
xlClipboard Clear Contents | Excel Programming |