I have a formula field that is just at the compilation limit maximum, and cannot be expanded any more, formatted as such: FieldA__c/FieldB__c

I would like to reference the value of this formula field in another formula within a field update. How can I exception handle in the field update if the formula may sometimes contain "#Error!" ? Currently trying to use it I receive "Division by zero" or "Division undefined" if either the numerator or denominator in the aforementioned formula is zero.

Formatting my original formula field as the below will compile too large:


  • Thanks Daniel, unfortunately my original formula would compile too large (6061 characters) if I included that IF statement or anything else in the formula to error catch. The error catch needs to occur during the field update (if at all possible) since there is no way around receiving an "#Error!" in the formula field that is being referenced.
    – Marv-o
    May 21, 2014 at 19:33
  • Is X3P_RCP_eCPM a formula as well? I'm wondering if you can got down into a lower formula to fix something. You could also use cascading field updates to split up the formula into manageable pieces. Also, see this idea for an ISERROR() function. success.salesforce.com/ideaView?id=08730000000kkYZAAY May 21, 2014 at 19:45
  • X3P_RCP_eCPM and Commission Price are large formulas, each made of Rollup Summaries and even more formulas. Each formula in the chain has an error catch like below along the way. This particular formula NEEDS to occur instantly instead of having a field update run it, since all the children are connected via the rollup.
    – Marv-o
    May 21, 2014 at 20:00
  • Changing the "Blank Field Handling" value from "Treat blank fields as zeroes" to "Treat blank fields as blanks" does not mitigate the problem
    – Marv-o
    Jun 26, 2014 at 20:05

1 Answer 1


You will probably need to put some IF statements in your formula and return different values depending on the two field values. Try something like this. You may need to nest your IFs to catch all the potential problems.

IF(FieldB__c = 0, null, FieldA__c/FieldB__c)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .