
Originally Posted by
levo_redkid
Hi all,
I have a worksheet range (say a1:z500) with a lot of values in it, some of these values are errors, like # DIV /0!, # value!, etc...
I want to write a code which replaces all these error values with smth else like "n.a."
I assume this is a basic question, but I'm still at the early stages of learning this stuff..
Many thanks,
-levent
Hi,
Sub Error_Replace()
Dim rCell As Range
For Each rcell In Range("A1:Z500")
If Application.WorksheetFunction.IsError(rCell) Then
rCell = "n/a"
End If
Next
End Sub
HTH
Bookmarks