Skip to main content

Can I do simple math?

  • January 12, 2023
  • 3 replies
  • 42 views

Forum|alt.badge.img+3

In Google Sheets, I do this in a cell:

=1+1

...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.

3 replies

Greg_F
Forum|alt.badge.img+18
  • Brainy
  • January 13, 2023

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!


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • January 13, 2023

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. 


Forum|alt.badge.img+3
  • Author
  • New Participant
  • January 13, 2023

Both helpful answers, thanks very much.