T
Tempy
Good day,
I need to look down a column for a certain value and delete all
occurances. I have done this by filtering using the code below but not
all instances are deleted ?
Sub Test()
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=2
Selection.AutoFilter Field:=22, Criteria1:="#N/A"
Cells(Range("V5").CurrentRegion.Offset(6,
0).SpecialCells(xlCellTypeVisible).Row, 22).Select
Selection.CurrentRegion.Select
Selection.ClearContents
Range("V311:Z311").Clear
test2
End Sub
Could somebody help with some better code or suggestion.
Thanks in advance
Tempy
*** Sent via Developersdex http://www.developersdex.com ***
I need to look down a column for a certain value and delete all
occurances. I have done this by filtering using the code below but not
all instances are deleted ?
Sub Test()
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=2
Selection.AutoFilter Field:=22, Criteria1:="#N/A"
Cells(Range("V5").CurrentRegion.Offset(6,
0).SpecialCells(xlCellTypeVisible).Row, 22).Select
Selection.CurrentRegion.Select
Selection.ClearContents
Range("V311:Z311").Clear
test2
End Sub
Could somebody help with some better code or suggestion.
Thanks in advance
Tempy
*** Sent via Developersdex http://www.developersdex.com ***