View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Heera Heera is offline
external usenet poster
 
Posts: 98
Default Macro for removing error values in cells.

Hi,

I have a set of data in column H and most of the cells has the error
value "#N/A".
I want to replace the error value from "#N/A" to "-"(Dash).
Following is the code but I am getting a error (Type Mismatch) while
running the code.

Range("H5").Select

Do Until ActiveCell.Value = ""
If ActiveCell.Value = "#N/A" Then
ActiveCell.Value = "-"
Selection.Offset(1, 0).Select
End If
Selection.Offset(1, 0).Select
Loop

Can someone suggest me the code which can replace the error values.

Regards
Heera Chavan