[SOLVED]Calculation formula if/else

Home – SaaS Forums Support questions WooPrice Calculator (Pro) [SOLVED]Calculation formula if/else

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7152
    ignite
    Participant

    Hello,

    We have a calculation formula which works fine, but we want to add an “if” logic, to limit the lowest price to e.g. 100.
    example logic: run this formula, but if result is less than 100, then make result 100.

    We basically want to set a lowest limit on price.

    Thanks

    #7157
    bill
    Participant

    Hello Ignite,
    in your excel file for addding an if condition you just need to add a formula like the example below:

    =IF(Your formula that has the final price<100;100;Your formula of the final price)

    The logic will be that for the end user will always show a minimum of 100.

    Kind Regards,
    Bill
    AT886

    #7156
    ignite
    Participant

    Thanks.

    We have not used Excel so far. So two questions:

    1) Can we use the IF statement in the regular Formula box, in a Calculator entry?

    2) Can we use an IF statement to set a minimum value for each field separately? e.g. we want to allow the user to type in a number below 100 in the fields, but in the calculation, we want to calculate these values as 100 minimum.

    Thanks

    #7155
    Paul
    Participant

    Hello,

    1. No, the mathematical box don’t allow if statements. If you need to use IF statements you need to use them in your excel file. So you can use the IF function of excel.
    Look at this to know about the if function: https://exceljet.net/excel-functions/excel-if-function
    Look at here to how to use excel with calculator: https://altoswebsolutions.com/manual/woo-price-calculator/start
    and https://altoswebsolutions.com/manual/woo-price-calculator/creating-a-calculator-from-a-spreadsheet-file-pro
    2. You can set in your calculation (in excel) the condition if lower than 100 set a default price.
    If you

    Let us know if this solved your issue.

    Best Regards
    Paul
    AT886

    #7154
    ignite
    Participant

    Hello,

    We have managed to get IF statements to work in Excel, and with successful import to the Calculator.

    However, calculations inside an IF statement do not seem to work (but they work fine in Excel).

    example…
    We have a List input (D2 Excel field) like so:
    a [Value: 0]
    b [Value: 0]
    c [Value: 0]
    d [Value: 0.002]

    Then we calculate price with this formula: =IF(D2=0.002,0.2*E2,0)

    It works in Excel just fine. But in your Calculator, the 0.2*E2 part is not executed.
    It works fine in your Calculator, if we put fixed values e.g. =IF(D2=0.002,100,0)

    Any idea? Thanks

    #7153
    Paul
    Participant

    Hello

    Did you check the same file in our demo site: https://altoswebsolutions.com/live-demo/wordpress?
    Otherwise, Could you send to us your excel?

    We will be waiting for your feedback.

    Best Regards
    Paul
    AT886

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.