Thread: Divide By 0
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Divide By 0

Mike

If you are willing to use a Macro..........

Sub ErrorTrapAdd()
Dim myStr As String
Dim Cel As Range
For Each Cel In Selection
If Cel.HasFormula = True Then
If Not Cel.Formula Like "=IF(ISERROR*" Then
myStr = Right(Cel.Formula, Len(Cel.Formula) - 1)
Cel.Value = "=IF(ISERROR(" & myStr & "),0," & myStr & ")"
End If
End If
Next
End Sub

Select the cells and run macro.

Gord Dibben XL2002

On Sat, 29 Nov 2003 17:28:42 -0600, "Chip Pearson"
wrote:

Mike,

There is no such setting. You would have to modify the formulas
individually.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Mike Short" wrote in
message ...
The workbook I inherited contains many cells that are
vulnerable to divide by zero errors. Is there any "global"
fix so if the divisor is zero the error will not be
displayed?

Thank you