Sandwich existing formulas with "If iserror(formula),0,formul
This worked perfectly.
Thank you so much Mike.
"Mike H" wrote:
Hi,
Try this macro. Select the formula you want to change and run it. Try it in
a test environment first
Sub Sonic()
For Each c In Selection
If c.HasFormula Then
F = Mid(c.Formula, 2)
c.Formula = "=IF(ISERROR(" & F & "),""""," & F & ")"
End If
Next
End Sub
Mike
"ORLANDO VAZQUEZ" wrote:
Hi,
I have several hundred different formulas on one spreadsheet like this one.
=VLOOKUP($C$1,'P:\Rate Sheets\client name\[file name.xls]manager
name'!$BV$67:$CL$131,3,FALSE)
The results sometimes return #DIV/0!, or other error messages which ruin my
attempts at summing the results as well as the visual appeal.
Is there a way to rewrite (en masse) these formulas to so that they first
check "If(iserror(myformula),[then] 0, [else] myformula) so that rather then
an error result I will see a zero (0).?
I can manually change them but that would take a day at least.
Please let me know.
Thank you,
Orlando
|