Aug 26 2019 09:40 AM
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 - (9,85Kg / 0,5Kg) = only 19 and not 19,7 (as the 0,7 represents only 70% of the following pack unit of 500gr
Cell D28 should only display the integer = 19
See attached file
Aug 26 2019 09:52 AM
Aug 26 2019 03:13 PM
Just so that you have choice;
= INT( weight / pack )
= QUOTIENT( weight, pack )
= FLOOR( weight, pack ) / pack
Aug 26 2019 03:43 PM
Aug 27 2019 12:13 AM
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.
Aug 27 2019 03:07 AM
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.