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.

  • So what’s your question?
    – Alex
    Feb 3 '19 at 13:30
  • 2
    Hi, Matthias. It would be difficult to assess why cells are returning different values without seeing your sheet. I can tell you that December 30 is the date equivalent of 0 (i.e., December 30, 1899 is the date when Sheets starts marking time). So it's possible that you have different formatting in different cells. You haven't told us what the returned values should look like, but try selecting the entire column and applying Format > Number and then whatever the format should be for all. Otherwise, please share a link to the sheet, and we'll take a look.
    – Erik Tyler
    Feb 3 '19 at 18:08
  • 2
    To be extra clear, if B24 and C24 were empty, then D24 = 0-(0*N$2) ... which can only be 0. And again, the date equivalent of 0 is December 30, 1899. So it is giving you the correct result, just not in the format you'd like to see. Change the format for the entire column according to my instructions above, and you should be all set.
    – Erik Tyler
    Feb 3 '19 at 19:45

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):

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.