View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
merlin63 merlin63 is offline
external usenet poster
 
Posts: 1
Default Excel VBA - Skipping #VALUE! error

I am using the following macro in a worksheet (this is a partia
macro):

j = 1
invSheet.Activate
Range("A1").Select
For i = 0 To ActiveSheet.UsedRange.Rows.Count

If ActiveCell.Offset(i, 3).Value < 0 Then
newSheet.Range("A" & j).Value = ActiveCell.Offset(i, 0).Value
j = j + 1
End If
Next i

End Sub

There is only one problem with the macro. If it runs into any valu
that is not a number such as #VALUE! or #N/A, the macro stops. M
assumption is that I could use ISERROR somewhere in this macro t
ignore any error that can occur. How can I implement it into the macr
properly?

Thanks

--
Message posted from http://www.ExcelForum.com