View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wouter HM Wouter HM is offline
external usenet poster
 
Posts: 99
Default Deleting rows when cell has "#DIV/0!" error

Hi matt,

In Excel 2003 I creates this:

Sub DeleteRowsIfDIsError()

Dim i As Integer
With ActiveSheet
' start with last used row
For i = Cells(65536, 4).End(xlUp).Row _
To 1 Step -1
If IsError(Cells(i, 4).Value) Then
Rows(i).EntireRow.Delete
End If
Next
End With
End Sub

HTH,

Wouter