pretty much what the title says. I have a sheet I'm making a calculator in, and at random (after a refresh or change) the cells in this column will die and start giving outputs that are entirely wrong from what the formula says the result should be. Even when clicking on the formula, it gives the correct answer, however this is not what is displayed.
I initially thought that it could be an issue with volatile functions since the cells (eventually) reference a randmap function, but even after following someone else's advice to "freeze" the values, the issue still occurs
there was also the possibility that it was due to iterative calculations, but the calculator absolutely relies on it being on, so it's not like I can just turn it off.
does anyone know what may be causing this and how to prevent it? again it only happens sometimes with very little rhyme or reason
More information on the specific case:
The column having issues references two other columns, as well as itself, I'll try to explain how it worksThe cell in the images is cell c10, and the formula is
if(F10<>0,let(currentenergy,(ROUNDDOWN((F10-F9)/30)*(4/3))+IF(E10="basic",1,0)+C9,(if(GTE(currentenergy,100),100,currentenergy)-if(E10="energy",100,0))),0)
first off, the 3 columns used. column c is the energy column, which is the one thats having issues, it should almost always be increasing, and only decreases by 100 when it does, it also should be limited to be between [0,100]. column e is the outcome column, it has 4 possible values: basic, skill, energy, or 0/empty. lastly column f is the frames column, which measures how much simulated time has passed in frames, this column also sometimes has issues. each row represents the current state at a single point in time that changes, in this case row 10 corresponds with frame 189
now to the formula itself. First it checks if the current outcome cell (e10) is 0, if it is, then it simply returns a zero and doesn't proceed. If it is not 0, then the main part of the formula is done. first, it finds out the time between the current and previous row in seconds [rounddown((f10-f9)/30)] then multiplies that by 1.333, as that is the energy gain per second. then it checks if the current outcome is a basic, if it is, then it gives 1 more energy, it then adds those 2 values together, making the energy gained on the current frame, before adding that value to the previous energy value, continuing the running total. If all of that results in being above 100 energy, it is capped out at 100, if not, it runs as normal. lastly, if the current outcome is an energy skill, then the running total is reduced by 100, as that is the energy cost of casting an energy skill.
in the example provided, the previous energy total is (c9) is 4.666 energy. in the next row, a full second has not passed yet, and a basic attack was not used, no additional energy should be added in c10, making the expected result 4.666, equal to c9. however, as you can see, the cell output instead decided that the energy should drop by 2.666 down to 2
here you can see the wrong answer showing up
right answer from the formula

