Title: what´s wrong with this expression?
Last modified: August 20, 2016

---

# what´s wrong with this expression?

 *  Resolved [raulelenes](https://wordpress.org/support/users/raulelenes/)
 * (@raulelenes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-expression/)
 * what’s wrong with this formula expression?
 * IF(AND(dom=1,IF(AND(weight>500,weight<1001),200.00,0))
 * I like that with dom=1 condition and weight higher than 500 and lower than 100,
   results in 200 value, if not in 0, but I believe this is wrong expressed and 
   yields a #NAME? and #REF! errors
 * [http://wordpress.org/extend/plugins/jazzy-forms/](http://wordpress.org/extend/plugins/jazzy-forms/)

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

 *  Thread Starter [raulelenes](https://wordpress.org/support/users/raulelenes/)
 * (@raulelenes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-expression/#post-3384234)
 * Another tested variation was:
 * IF(AND(dom=1,IF(AND(weight>500,weight<1001),200.00,0),0)
 * and didn´t work at all.
 *  Thread Starter [raulelenes](https://wordpress.org/support/users/raulelenes/)
 * (@raulelenes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-expression/#post-3384236)
 * I just realized with some excel logic expressions research the right expression:
 * IF(AND(dom=1,AND(weight>500,weight<1001)),200.00,0)
 * and worked ok!
 *  [scattered810](https://wordpress.org/support/users/scattered810/)
 * (@scattered810)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-expression/#post-3384391)
 * Raulelenes, that bit of code for using three variable with the and statement 
   worked perfectly for me. Thanks!

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

The topic ‘what´s wrong with this expression?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jazzy-forms_dac291.svg)
 * [Jazzy Forms](https://wordpress.org/plugins/jazzy-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jazzy-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jazzy-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/jazzy-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jazzy-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jazzy-forms/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [scattered810](https://wordpress.org/support/users/scattered810/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/whats-wrong-with-this-expression/#post-3384391)
 * Status: resolved