Google-sheets – Google Sheets function returns an incorrect value

formattingformulasgoogle sheets

I have a very simple function for every cell in column D, for example:

D24 =C24-(B24*N$2)

Example with values:

D24 =10-(1*6,5)

This works; however, not all the time. For cell D24 this returns a date 30-12, while B24 & C24 being empty.

Best Answer

if you see weird values like dates in your calculations, then its most likely due to formatting. to fix it do this (if you don't want decimals then click on More Formats and customize the visual as you wish):