Title: Problem with the &#8216;IF&#8217; command
Last modified: February 4, 2024

---

# Problem with the ‘IF’ command

 *  Resolved [informativos](https://wordpress.org/support/users/informativos/)
 * (@informativos)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-the-if-command/)
 * Hi! I´m trying to make a resume of savings in a theoretically donation transaction
   but I´m been unable to do it.
 * The formula is: 1-250 saves 80% 
   and <250 is: first 250, 80% And the rest 40%
   For X <= 250€: X*0.8For X > 250€: (250*0.8) + (X-250)*0.4Any idea how to construct
   the ‘IF’ to work properly and as expected? formula/sentence?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-the-if-command%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-the-if-command/#post-17397730)
 * Hello [@informativos](https://wordpress.org/support/users/informativos/)
 * Your equation does not need an “if” conditional statement of the “IF” operation.
   You can implement the process with basic mathematical operations.
 * Assuming the field for donation is the fieldname123. The equation in the calculated
   field can be implemented as follows:
 *     ```wp-block-code
       MIN(fieldname1, 250)*0.8+MAX(fieldname1-250, 0)*0.4
       ```
   
 * Best regards.
 *  Thread Starter [informativos](https://wordpress.org/support/users/informativos/)
 * (@informativos)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-the-if-command/#post-17399284)
 * Wow! It works!
 * I can understand the commands very well but it works
   Thnks!!
    -  This reply was modified 2 years, 4 months ago by [informativos](https://wordpress.org/support/users/informativos/).

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

The topic ‘Problem with the ‘IF’ command’ 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

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

 * 2 replies
 * 2 participants
 * Last reply from: [informativos](https://wordpress.org/support/users/informativos/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/problem-with-the-if-command/#post-17399284)
 * Status: resolved