Title: Multiple Results
Last modified: August 22, 2016

---

# Multiple Results

 *  Resolved [jcmosquera](https://wordpress.org/support/users/jcmosquera/)
 * (@jcmosquera)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-results/)
 * Is it possible to have different IF statements, and the one that fits the user
   input will be shown?
 * For example:
 * IF(fieldname4==0.154,fieldname18/12384,0);
    IF(fieldname4==0.218,fieldname18/
   8988,0);
 * Meaning: if fieldname4 is 0.154( its a dropdown choice) then result is fieldname18/
   12384; if fieldname4 is 0.218 then result is fieldname18/8988.
 * I tried with the two IFs shown above as my equation but it wont work. Is this
   even possible? Or is my syntax wrong?
 * Thanks!
 * [https://wordpress.org/plugins/calculated-fields-form/](https://wordpress.org/plugins/calculated-fields-form/)

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-results/#post-5590939)
 * Hi,
 * The correct syntax would be:
 * IF(fieldname4==0.154,fieldname18/12384,IF(fieldname4==0.218,fieldname18/8988,0))
 * And it is read as follow:
 * If fieldname4 is equal to 0.154, the result is: fieldname18/12384, else, if fieldname4
   is equal to 0.218, the result is: fieldname18/8988, else return 0
 * Another possible solution, but this time with the conditional statement “if”,
   would be:
 * (function(){
    if(fieldname4==0.154) return fieldname18/12384; if(fieldname4==
   0.218) return fieldname18/8988; return 0; })()
 * Best regards.
 *  Thread Starter [jcmosquera](https://wordpress.org/support/users/jcmosquera/)
 * (@jcmosquera)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-results/#post-5590942)
 * Awesome, that worked like a charm!
    Im amazed at the quick response, thanks! 
   Keep a it!

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

The topic ‘Multiple Results’ is closed to new replies.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

## Tags

 * [Calculated](https://wordpress.org/support/topic-tag/calculated/)
 * [multiple results](https://wordpress.org/support/topic-tag/multiple-results/)
 * [result](https://wordpress.org/support/topic-tag/result/)

 * 2 replies
 * 2 participants
 * Last reply from: [jcmosquera](https://wordpress.org/support/users/jcmosquera/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/multiple-results/#post-5590942)
 * Status: resolved