View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
DFrank DFrank is offline
external usenet poster
 
Posts: 28
Default macro to delete certain results

Ok thanks, but for some reason ITEM and zeros still appear. i changed the
code to this:

For Each Cell In Selection
If Cell = "total board" Or Cell = "total metal" Or Cell = "ITEM" Or Cell
= "0" _
Or IsNumeric(Cell) Or Cell.HasFormula _
Or IsError(Cell) Then
Cell.Delete
End If
Next Cell



is that right? thanks.

"Jarek Kujawa" wrote:

the browser wrapped it incorrectly AGAIN



Public Sub DeleteStuff()

For Each cell In Selection
If cell = ""total board" or cell = "total metal" _
or IsNumeric(cell) or cell.HasFormula _
or IsError(Cell) Then
cell.Delete
End If
Next cell

End Sub

this should work well