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

Problem Formula and NaN

Topic Labels: Formulas
412 2
Showing results for 
Search instead for 
Did you mean: 

Hello everyone !

I have to calculate the cost of a product. It can be made of Tissu, Wool or both.

The problem comes from the “total” columns with a Formula field. When I have some empty fields, the “total” field shows “NaN” because it divides by 0.
I can’t write the formula to avoid this.
Does anyone have a solution?
Thank you in advance,

My formula :
IF({Prix Tissu}=0, {Prix Tissu}/{Nb par tissu}=0){Prix Tissu}/{Nb par tissu}Airtable problème

2 Replies 2

Hi. You want something like the following.

IF(AND({Prix Tissu},{Nb par tissue}), {Prix Tissu}/{Nb par tissu})

The AND part is saying that all of the arguments need to be not empty. If that is true, then the division can take place. Otherwise, return nothing. No NaN will be displayed.

Good luck!

Thanks for your help. I finally find the good syntaxe :grinning_face_with_big_eyes: