Deleting values less than 100

  • Thread starter Thread starter PointerMan
  • Start date Start date
P

PointerMan

I want to select a large range of cells and delete the cells that have a
value less than 100. Any suggestions?
 
seems to me you look for ClearContents instead of deleting cells. use
this macro

Sub sth()
Dim cell As Range

For Each cell In Selection
If cell.Value < 1000 Then
cell.ClearContents
End If
Next cell


End Sub
 
Select the cells and run this macro:

Sub clearsmall()
Dim r As Range
For Each r In Selection
If r.Value < 100 Then
r.Clear
End If
Next
End Sub
 
Back
Top