Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here
Mar 12, 2020 11:44 AM
I have a formula to calculate how many plants I can fit in a 10x12" square. My formula goes: 10/Spacing * 12/Spacing.
(Spacing is a column where I record the number of inches of distance a plant needs).
The formula works, except for in two instances- 1. When I have not filled out the spacing column yet, the formula produces ‘INFINITY’ as the result. I’d like it to return a blank field instead of returning ‘INFINITY’. 2. When the plant requires two 10x12" squares (i.e. when the Spacing is 24"), the formula produces 0. I would like that changed to 2, or even better, an actual calculation with a decimal, like 1.5, 2.5, etc. Can anyone help? I’ve searched similar issues but can’t find anything that helps me.
Solved! Go to Solution.
Mar 12, 2020 12:30 PM
What is the Field type you have in this column? It should be a Formula field to work. If you put Zero, remove the quotation marks.
Mar 12, 2020 11:58 AM
Welcome to Airtable Community!
For your first question, you can do an IF formula that in case Spacing is blank, the answer is blank. If not, then your formula is calculated.
IF({Spacing} = 0, " ", 10/Spacing * 12/Spacing)
As for your other question, check the Formatting of the field, change it to Decimal.
BR,
Mo
Mar 12, 2020 12:18 PM
Thank you! Everything worked except for now the Formula itself is displaying as a long string of decimals and it is saying “Your result type is not a number or a date. Formatting options are currently only available if your result type is a number or a date.” I think this is because of the blank answer part of the formula. Is there a way to alter the formula to make the results display as an integer or one decimal maximum?
UPDATE: I tried editing the blank display to ‘0’ just to get a number in there, and it still didn’t work.
Mar 12, 2020 12:30 PM
What is the Field type you have in this column? It should be a Formula field to work. If you put Zero, remove the quotation marks.
Mar 12, 2020 12:51 PM
Thank you. Removing the quotes fixed it!