Zum Hauptinhalt gehen

Suche

Suche

Formatnumber(14.89,0) Is Rounding To 15

Kommentare

1 Kommentar

  • Avatar
    Michael Toupin (mtoupin

    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.