Forum Discussion
Johann Fourie
Aug 26, 2019Copper Contributor
How to apply a division formula to display only the Integer (whole number) result?
How do I apply a formula and/or formatting to display only the integer result when both the input fields have decimal values. See my attached file - 1. Cell D28 = the result of Cell D26 / Cell K6 -...
SergeiBaklan
Aug 26, 2019Diamond Contributor
PeterBartholomew1
Aug 27, 2019Silver Contributor
True. Once one starts looking, there appears to be a bewildering number of options! I could add
= ROUNDDOWN(weight/pack, 0)
= MROUND( weight, pack ) / pack
Not that I can see any difference between the MROUND and FLOOR functions.
The OP can be interpreted not so much as 'how can I perform the calculation?' as 'which, of all the options, is the clearest?'.
I would favour one of these last two functions because the intent of each step of the calculation is clear but I could also go with INT on the grounds that it is the most basic function that will do the job.
- SergeiBaklanAug 27, 2019Diamond Contributor
Peter,
IMHO, FLOOR works with negative numbers and MROUND not. But with both you may receive floating point error if second parameter is not integer.