Help

Save the date! Join us on October 16 for our Product Ops launch event. Register here.

Re: Converting formulas from Excel to Airtable

790 0
cancel
Showing results for 
Search instead for 
Did you mean: 
tracymf-tkk
5 - Automation Enthusiast
5 - Automation Enthusiast

I have an excel spreadsheet with many calculations.  Given my current understanding of formulas, it is very much like excel so my question is below.

Formula in Excel

=IF(SUM(N22:Q23)<>0,SUM(N22:Q23),"")

Field names in Airtable

N22= シャトル台数(Shuttle Qty)

Q23= 予備シャトル台数(Sp. Shuttle Qty)

So my airtable formula should be as follows

IF(SUM({シャトル台数(Shuttle Qty)}:{予備シャトル台数(Sp. Shuttle Qty)}<>0,SUM({シャトル台数(Shuttle Qty)}:{予備シャトル台数(Sp. Shuttle Qty)}),"")

But I keep getting an error. Where are my assumptions wrong?  It is simple addition problem

Order Qty - Shuttle
Shuttle Qty28
Spare Shuttle Qty2
Total Shuttle Qty30
1 Reply 1

Airtable formulas and Excel formulas are based on different langauges.

  • In Airtable, the "not equal to" operator is != versus <>.
  • In Airtable, there should be a comma instead of a colon between items in the SUM() function.
  • In Airtable, if you the third parameter of an IF() function is optional. Including an empty string as the third parameter will turn you result into a text string instead of a number.
  • You are also missing a closing parenthesis.

Try something like this ...

IF(
  SUM({シャトル台数(Shuttle Qty)}, {予備シャトル台数(Sp. Shuttle Qty)}) != 0,
  SUM({シャトル台数(Shuttle Qty)}, {予備シャトル台数(Sp. Shuttle Qty)})
)