Title: !ERROR! division by zero
Last modified: December 20, 2018

---

# !ERROR! division by zero

 *  Resolved [Jordon Rupp](https://wordpress.org/support/users/jordonrupp/)
 * (@jordonrupp)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/)
 * Is there a workaround for eliminating the `!ERROR! division by zero` issue which
   occurs from formulas referencing cells with zero values? Perhaps an IF conditional
   formula? Also, either the “then” or “else” value would also need to be a formula.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/#post-11011124)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * You basically have the solution already 🙂 Indeed, `IF()` is the way to go:
 *     ```
       =IF( A1<>0, B1/A1, 0 )
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [Jordon Rupp](https://wordpress.org/support/users/jordonrupp/)
 * (@jordonrupp)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/#post-11013270)
 * Thanks, Tobias! I’m still receiving `!ERROR! division by zero` for the formula`
   =IF( F2>0, D2/F2, 0 )` when cell F2 has a value of zero.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/#post-11013573)
 * Hi,
 * ah, yes. The problem here is that this division is still evaluated (because of
   the recursion).
    You could maybe try this trick:
 *     ```
       =IF( F2>0, D2/( IF( F2>0, F2, 1 ) ), 0 )
       ```
   
 * Basically, in the case that F2 is zero, the division will now divide by 1 instead
   of F2 – but never use that division result, because of outer IF.
 * Regards,
    Tobias
 *  Thread Starter [Jordon Rupp](https://wordpress.org/support/users/jordonrupp/)
 * (@jordonrupp)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/#post-11013764)
 * Brilliant, that did the trick. Thank you!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/#post-11014188)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘!ERROR! division by zero’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/error-division-by-zero-2/#post-11014188)
 * Status: resolved