Help, need macro command that will change #DIV/0 to 0

  • Thread starter Thread starter mulehead
  • Start date Start date
M

mulehead

Unfortunately, I am trying to reverse engineer something, so I need a macro
command that will change #DIV/0 to 0 in all cells with #DIV/0, basically I
need to treat the symptom instead of treating the problem. Thanks for your
help.
 
Sub divfixer()
For Each r In ActiveSheet.UsedRange
If r.Value = "#DIV/0#" Then
r.Value = 0
End If
Next
End Sub
 
Back
Top