Trying to recreate a Google Sheets Formula in Form Calculation

  • JDog84
    Asked on April 6, 2024 at 5:08 PM

    I have a google sheet that collects responses from a form and I have a formula in the sheet that I would like to replicate in the form to streamline the process. The formula is 5000*(5-1)^3+150000.


    Is it possible to replicate this in Jotform Calculations?

  • Mike_G JotForm Support
    Replied on April 6, 2024 at 7:51 PM

    Hi Jason,

    Thanks for reaching out to us for help. I understand what you want to do with your form, but I’ll need a bit of time to work out a solution. I’ll get back to you as soon as I can.

    In the meantime, let us know if you have any other questions.

  • Mike_G JotForm Support
    Replied on April 6, 2024 at 11:36 PM

    Hi Jason,

    Thanks for your patience and understanding, we appreciate it. The formula you provided gives 470000 in Excel as shown in the screenshot below:

    Trying to recreate a Google Sheets Formula in Form Calculation Image 1 Screenshot 50

    You can replicate the formula by using the Form Calculations Widget on your form. Let me show you how:

    1. Open your form in Form Builder, and click on the Add Form Element menu on the left side of the page.

    2. Under the Widgets tab, drag and drop the Form Calculation widget to your form.

    Trying to recreate a Google Sheets Formula in Form Calculation Image 2 Screenshot 61

    3. In the widget settings, which you can also access the Form Calculation widget settings by clicking the Wand icon on the right of the Calculation field, you can either use the keys on your keyboard or use the numpad on the right to enter the formula below in the calculation box.

    Note: You can get the pow() function by clicking on the fx formula icon on the numpad.

    Trying to recreate a Google Sheets Formula in Form Calculation Image 3 Screenshot 72

    Check out the screenshot below to see the result:

    Trying to recreate a Google Sheets Formula in Form Calculation Image 4 Screenshot 83

    You can find my Test Form here. Feel free to clone my form to your account so you can inspect it. Click here to see how to clone the form. We also have guides about how to perform form calculations using a widget and form calculation math function reference that you can check out.

    Give it a try, and reach out again if you have any other questions.

  • JDog84
    Replied on April 8, 2024 at 4:48 PM

    Is it possible to replace the 5 in the 5-1 section with a form field so that users can select a different option from the field in question and it will change the calculation?

  • Mike_G JotForm Support
    Replied on April 8, 2024 at 5:57 PM

    Hi Jason,

    Thanks for getting back to us. You can change the 5 - 1 section in the formula with a form field so its value will be based on your form respondent's answer. Let me show you how:

    1. Open your form in Form Builder, and click on the Form Calculation widget.

    2. On the right side of the widget, click on the Wand icon to open the Widget settings.

    3. Remove the 5 - 1 section, including the parenthesis, in the formula.

    4. Click on the Add Field button on the numpad on the right to select a field you want to add to the formula.

    5. Click on Save at the bottom to save the changes.

    Trying to recreate a Google Sheets Formula in Form Calculation Image 1 Screenshot 30

    Check out the screenshot below to see the result:

    Trying to recreate a Google Sheets Formula in Form Calculation Image 2 Screenshot 41

    You can find my Test Form here. Feel free to clone my form to your account so you can inspect it. Click here to see how to clone the form.

    Give it a try, and reach out again if you have any other questions.

  • JDog84
    Replied on April 9, 2024 at 9:42 PM

    This is what I am seeing in the Calculation Box: Trying to recreate a Google Sheets Formula in Form Calculation Image 1 Screenshot 30

    And this is the formula:

    Trying to recreate a Google Sheets Formula in Form Calculation Image 2 Screenshot 41

  • Richie JotForm Support
    Replied on April 10, 2024 at 3:24 AM

    Hi Jason,

    I have been testing a cloned version of your form and it seems the issue is that you have enabled calculation values inside your dropdown field. To disable the calculation values, let me show you how:

    1. In Form builder, click your dropdown field and click on gear icon.
    2. Under Dropdown Properties, click on Options tab.
    3. Scroll down to Calculation Values and toggle to OFF.

    Trying to recreate a Google Sheets Formula in Form Calculation Image 1 Screenshot 30

    Once you disable the calculation values, the calculation would be correct. Check out this screenshot of my test:

    Trying to recreate a Google Sheets Formula in Form Calculation Image 2 Screenshot 41

    Give it a try and let us know if this works for you.

  • JDog84
    Replied on April 11, 2024 at 11:53 AM

    This worked. Thank you


 
Your Answer