Title: IF statement with 2 rules
Last modified: August 24, 2016

---

# IF statement with 2 rules

 *  [meij168](https://wordpress.org/support/users/meij168/)
 * (@meij168)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/)
 * I installed Jezzy Forms last night. The pricing I want to do is very simple, 
   no calculation necessary, IF statements should work. The two rules for my pricing
   is X: level of services & Y: maximum number of transactions. They both have 3
   options each. This means we should have 3×3 prices. I use drop down menu for 
   these and I give X & Y as the ids for the rules, and the values for the 3 options
   under each rule are 1, 2, 3.
    In the third element, I use output, the id I give
   to it is C. The formula I put in is: if a=1 and b=1 then $80
 * I think the problem is in the formula. What’s the correct way I should do these?
 * [https://wordpress.org/plugins/jazzy-forms/](https://wordpress.org/plugins/jazzy-forms/)

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

 *  Thread Starter [meij168](https://wordpress.org/support/users/meij168/)
 * (@meij168)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990006)
 * Sorry, the formula I put in is:
    IF X=1 and Y=1 then $80 IF X=1 and Y=2 then 
   $130 ……….
 *  Thread Starter [meij168](https://wordpress.org/support/users/meij168/)
 * (@meij168)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990009)
 * So far I have used three elements:
    1. drop down menu for the first rule, I give
   it an id X, the three option with value of 1, 2, 3 2. drop down menu for the 
   second rule, I give it an id Y, the three option with value of 1, 2, 3 3. output:
   I give it an id C, the formula I use is: IF X=1 and Y=1 then $80, IF X=1 and 
   Y =2 then $130……..
 * Can anybody teach me how to do this job?
 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990051)
 * Hi,
    I stopped using this plugin a while back. From memory, you could try something
   like this:
 *     ```
       (IF(AND(X=1,Y=1),80,IF(AND(X=1,Y=2),160)))
       ```
   
 * Good luck!
 *  Thread Starter [meij168](https://wordpress.org/support/users/meij168/)
 * (@meij168)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990072)
 * Hello barnez, thank you very much for your help. I will try your idea tonight.
   
   By the way, I am trying another plugin as well and I read your contribution there
   as well. Thanks a lot!
 *  Thread Starter [meij168](https://wordpress.org/support/users/meij168/)
 * (@meij168)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990077)
 * Thanks barnez, it works well. I am now getting 3×3 prices.
 *  [barnez](https://wordpress.org/support/users/pidengmor/)
 * (@pidengmor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990078)
 * That’s great news. I was really happy with the jazzy forms, and it worked perfectly
   for me with quite a complicate formula. I only changed as I needed a functionality
   that wasn’t available with this plugin.
 *  Thread Starter [meij168](https://wordpress.org/support/users/meij168/)
 * (@meij168)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990081)
 * Yes barnez, as a free Plugin, Jazzy Forms is really doing a good job, even some
   paid plugin can’t work as well. But we shouldn’t expect a plugin to do everything
   for us.
 * Thanks for your help again!

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

The topic ‘IF statement with 2 rules’ 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/)

 * 7 replies
 * 2 participants
 * Last reply from: [meij168](https://wordpress.org/support/users/meij168/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/if-statement-with-2-rules/#post-5990081)
 * Status: not resolved