'This function takes away errors in formulas and replace them for something
'more meaningful (a string defined by the user)
'example: quitarerror(1/0;"you can't divide by zero")
' result:"you can't divide by zero"
'Copyright, Andrés González, 2008
Function quitarerror(dato As Variant, reemplazo As Variant) As Variant
If IsError(dato) = True Then
quitarerror = reemplazo
Else
quitarerror = dato
End If
No comments:
Post a Comment