A tip for spreadsheet users that I have learned from watching a mistake made by others:
When you use
=MAX(M2-X2/M2,0.1)
to place a floor of 10% on how low you want your calculation to be of a fractional positive gap to reduce M2 to X2 by, please try to remember that the X2 cell value could be *already greater* than the M2 cell value.
You probably want
=IF(X2<M2,MAX(M2-X2/M2,0.1),0)
or similar.
Because if (say) M2 is 6.81E+10 and X2 is 7.99E+10, then your calculation is going to come up with 10% instead of 0%, let alone the correct -17%.
Which might be embarrassing. (-: