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

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.
 
G

Gary''s Student

Sub divfixer()
For Each r In ActiveSheet.UsedRange
If r.Value = "#DIV/0#" Then
r.Value = 0
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top