Automatic Formula Calculation

Tags: #<Tag:0x00007f8b1adc5940>

Hi,
I have 3 columns :
- Units
- Amount per Unit
- Amount

I would like to use only these 3 columns, and have them auto-calculate based on the values entered in the other 2 columns. So, if I change Units, I should calculate

  1. Units x Amount per Unit = Amount

and then if I change Amount per Unit (same formula)
2. Units x Amount per Unit = Amount

and then if I change the Amount
3. Amount / Amount per Unit = Units

How can this be implemented ?

Thank you :slight_smile:

Hi @indirextest2

I would like to use only these 3 columns, and have them auto-calculate based on the values entered in the other 2 columns

so it means that 3 columns

  • Units
  • Amount per Unit
  • Amount

are visible and there are 2 columns hidden (as they’re only used for calculations)?

It seems that formulas should meet your requirements. All the formulas are auto-recalculated on a cell value change.

Hi Aleksandra
We would need all 3 columns to be visible and editable please. I have seen some examples where the columns are hidden for calculation (similar to Excel) but we need all 3. How would you implement this ?

Normally you can use something like this https://jsfiddle.net/hv3q5b4p/1/ but if you have many rows I’d recommend creating a function to generate formulas.

As you can see when you change anything in column ‘Units’ or ‘Amount per Unit’ the formula column (‘Amount’) is updated.