Formatnumber(14.89,0) Is Rounding To 15
FormatNumber(14.89,0) is rounding to 15
is this the expected behavior.
I'm using now ver 10.1 im almost sure this is not the way it worked in the past
yona
0
-
Yes, that's correct. What FormatNumber does is rounds to the nearest digit, and adds commas at each thousandths place ( so FormatNumber(12345.678,2) would result in 12,345.68). FormatCurrency works the same way, but with the addition of a currency symbol at the beginning of the number. Setting the number of decimal places to 0 will result in a rounded whole number.
If your intention is to just show the whole number, you'd want to use a script like value = mid(data, 1, (instr(data,".") - 1)). This will just delete anything from the decimal point on.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar