Here's a snippit.Cant see your formula but my best guess is that the value the formula returns (ie the cell it refers to) is formatted as text and not as a number and the result cell is formatted as a number. In this case the formula may well evaluate to something that looks like a number but it appears in your sheet as text.
HTH
Problem is much easier to demonstrate. If a number is typed into a cell it's OK. However, any function defining the cell results in zero. For example, if B12 is 1234.5 and C12 is = B12 the result in C12 is 0. Note, the file is saved xlsm.