Login Page - Create Account

Support Board


Date/Time: Tue, 04 Mar 2025 15:19:11 +0000



Post From: Rounding floats in spreadsheet

[2021-12-09 21:14:16]
j4ytr4der_ - Posts: 946
I need to round the prices for CL as displayed in column J, as they are all in floats which is causing some problems with the spreadsheet I'm developing. Seems simple enough, but doesn't seem to work.

One example formula is in H96:

=MROUND(J96, J$21)

My tick value is being rounded using the recommended formula at Spreadsheet Example Formulas and Usage: Removing Floating Point Imprecision

=1 / ROUND(1 / J21, 0)

Currently for example, this gives me the following value in H96:

70.85999841615558

How can I actually round this and other price references to the tick value as expected?