- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 24, 2024 01:00 PM
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 Qty | 28 |
Spare Shuttle Qty | 2 |
Total Shuttle Qty | 30 |

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 24, 2024 01:50 PM
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)})
)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 17, 2024 01:49 AM - edited Dec 20, 2024 04:05 AM
in Airtable, you can't directly use a range like {シャトル台数(Shuttle Qty)}:{予備シャトル台数(Sp. Shuttle Qty)}, like you would in Excel. Instead, Airtable expects a formula to reference specific fields for calculations, so you'd need to reference them individually. Try something like:
IF(AND({シャトル台数(Shuttle Qty)} <> 0, {予備シャトル台数(Sp. Shuttle Qty)} <> 0), {シャトル台数(Shuttle Qty)} + {予備シャトル台数(Sp. Shuttle Qty)}, """")
This way, it checks if both fields are not zero and sums them. I had a similar experience trying to figure out Airtable formulas, and I remember being stuck until I found an option to show formulas in Excel, which helped me compare how Excel formulas and Airtable formulas differ.
