Jan 12, 2023 02:55 PM - edited Jan 12, 2023 03:14 PM
In Google Sheets, I do this in a cell:
...and the answer is output in the cell.
Can I do that in AirTable? To be clear, I want to have different formulas in each cell, not one formula for the whole column.
Jan 12, 2023 04:50 PM
Hi @philraymond ,
It will be one formula per column always. This is a good thing as it takes away the Sheets chaos...
Now to do math like above, you just create column A with free number input, column B with free number input and column C with fixed formula A * B.
If that math is not sufficient you create additional field D "Calculation type" - with single select containing "Add", "Substract" or "Multiply by 3 and deduct 1" and then you upgrade the formula in column C to something like:
SWITCH("Calculation type", "Add", A+B, "Substract", A-B, "Multiply by 3 and deduct 1", (A+B)*3-1 )
I hope that helps!
Jan 12, 2023 06:39 PM
No you cannot do this in Airtable. One of the differences between a spreadsheet and a database is that each editable cell value should be an “atomic” value, the smallest piece of meaningful data. When you have an expression like 1+1, you have multiple bits of meaningful data that you want to combine. If you find yourself wanting to do this often, you might want to revisit your base design.
Jan 13, 2023 07:34 AM
Both helpful answers, thanks very much.