Title: Multiple &#8220;IF&#8221;
Last modified: September 28, 2023

---

# Multiple “IF”

 *  Resolved [whatafilm06](https://wordpress.org/support/users/whatafilm06/)
 * (@whatafilm06)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/)
 * Hi, I can’t find anything about multiple IF in the documentation !
 * I want to create a formula that looks like : IF(B>2){100*0,5}, IF(B>6){100*0,7},
   IF(B>10){100*0,8} etc
 * But it takes the last “IF” formula everytime..
 * Thank you!

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

 *  Plugin Support [mgordon7](https://wordpress.org/support/users/mgordon7/)
 * (@mgordon7)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17092479)
 * Hi [@whatafilm06](https://wordpress.org/support/users/whatafilm06/)
 * You are using the formula incorrectly. You need to use proper js structure, for
   example with the help of the if(){}if else(){}
 * For details > [documentation](https://docs.stylemixthemes.com/cost-calculator-builder/calculator-elements/total#if-if-else-statement)
 * Best regards
 *  Thread Starter [whatafilm06](https://wordpress.org/support/users/whatafilm06/)
 * (@whatafilm06)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17092574)
 * Of course I read the documentation but I must do something wrong because when
   I use if else, I get “wrong formula” :
 * [https://levoyagedebetsalel.com/wp-content/uploads/2023/10/Capture-decran-2023-10-02-a-09.26.09.png](https://levoyagedebetsalel.com/wp-content/uploads/2023/10/Capture-decran-2023-10-02-a-09.26.09.png)
 * Thank you very much for your help
 *  Plugin Support [mgordon7](https://wordpress.org/support/users/mgordon7/)
 * (@mgordon7)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17098836)
 * Thank you for the clarification,
 * You wrote the code incorrectly, the structure IF ELSE is not correct.
 * You need to re-write the code and use ELSE IF
 * Regards
 *  Thread Starter [whatafilm06](https://wordpress.org/support/users/whatafilm06/)
 * (@whatafilm06)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17099450)
 * Thank you for your answer! 
   it works with 1 ELSE but I guess I need multiple 
   ELSE like this : [https://levoyagedebetsalel.com/wp-content/uploads/2023/10/Capture-decran-2023-10-04-a-15.14.19.png](https://levoyagedebetsalel.com/wp-content/uploads/2023/10/Capture-decran-2023-10-04-a-15.14.19.png)
   and I get the wrong formula when there is more than one ELSE In fact, here is
   what I am trying to do : [https://levoyagedebetsalel.com/wp-content/uploads/2023/09/Capture-decran-2023-09-21-a-09.07.50.png](https://levoyagedebetsalel.com/wp-content/uploads/2023/09/Capture-decran-2023-09-21-a-09.07.50.png)
   Thank you very much
 *  Plugin Support [juliastylemixthemes](https://wordpress.org/support/users/juliastylemixthemes/)
 * (@juliastylemixthemes)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17101876)
 * Hello [@whatafilm06](https://wordpress.org/support/users/whatafilm06/) ,
 * We should inform you that we have released a new version of the plugin that includes
   some fixes and improvements of formula field and its editor. Could you please
   update the Cost Calculator plugin?
 * Additionally, please be aware that there are some mistakes in your formula. The
   else if statement should not be seperated by extra “{}”. You can find below an
   example on how you can use the Else/If statement.
 * **IF**(B<6){100*5/100}**ELSE IF**(B<11){100-(100*10/100)}**ELSE IF**(B<16){100-(
   100*10/100)}**ELSE**{100}
 * Hope it helps!
 * Best regards,
    -  This reply was modified 2 years, 8 months ago by [juliastylemixthemes](https://wordpress.org/support/users/juliastylemixthemes/).
 *  Thread Starter [whatafilm06](https://wordpress.org/support/users/whatafilm06/)
 * (@whatafilm06)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17103516)
 * Thank you very much, it works perfectly ! The update is great !
 *  Plugin Support [juliastylemixthemes](https://wordpress.org/support/users/juliastylemixthemes/)
 * (@juliastylemixthemes)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17104241)
 * Dear [@whatafilm06](https://wordpress.org/support/users/whatafilm06/) ,
 * I’m pleased that the issue has been resolved and that the new update has met 
   your expectations. We are constantly working to enhance our product with new 
   features and options.
 * Furthermore, we sincerely appreciate your interest in our product. If you have
   enjoyed using it, we kindly request your assistance in leaving a positive review.
 * Your kind words serve as a great source of encouragement for our team, motivating
   us to continue improving our products and services.
 * We would be grateful if you could take a moment to visit the product page at 
   the following link: [https://wordpress.org/plugins/cost-calculator-builder/#reviews](https://wordpress.org/plugins/cost-calculator-builder/#reviews)
 * We value your understanding and willingness to help. Your support means a lot
   to us!
 * Best regards,

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

The topic ‘Multiple “IF”’ is closed to new replies.

 * ![](https://ps.w.org/cost-calculator-builder/assets/icon-256x256.png?rev=3525305)
 * [Cost Calculator Builder](https://wordpress.org/plugins/cost-calculator-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cost-calculator-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cost-calculator-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/cost-calculator-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cost-calculator-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cost-calculator-builder/reviews/)

## Tags

 * [if](https://wordpress.org/support/topic-tag/if/)

 * 7 replies
 * 3 participants
 * Last reply from: [juliastylemixthemes](https://wordpress.org/support/users/juliastylemixthemes/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/multiple-if/#post-17104241)
 * Status: resolved