Forum Discussion
How to calculate nearest value without decimals
- Feb 08, 2022
AKlompOoops! I was wrong here. One product measures just under 23 m2. Not just over 229 m2. Correct? Now you want to find a factor that multiplies the exact size of the product so that the last three digits of the integer are all zeroes. Correct?
If the 229284 is in A1, try this formula is you are on MS365 or 2021.
=1+(MATCH(0,MOD(INT(A1*SEQUENCE(1000,,1,0.001)),1000),0)-1)/1000
This will return 1.243
AKlomp The two measurements in mm result in just over 229 square meters. What the logic of wanting 285.000 m2? Why not 230.000 m2?
- Riny_van_EekelenFeb 08, 2022Platinum Contributor
AKlompOoops! I was wrong here. One product measures just under 23 m2. Not just over 229 m2. Correct? Now you want to find a factor that multiplies the exact size of the product so that the last three digits of the integer are all zeroes. Correct?
If the 229284 is in A1, try this formula is you are on MS365 or 2021.
=1+(MATCH(0,MOD(INT(A1*SEQUENCE(1000,,1,0.001)),1000),0)-1)/1000
This will return 1.243
- AKlompFeb 08, 2022Copper ContributorHi Riny, that's more like it! I need to experiment a little to make it more universal for my needs, but I think this is what I'm looking for. Many thanks!