Skip to content

fixed

Format a number with a fixed number of decimal places.

v = fixed(number, decimals, no_commas)

Returns number rounded and formatted with decimals digits after the decimal point (default 2). With no_commas = true, omits thousands-grouping commas.

fixed(1234567.891, 2) % '1,234,567.89'
fixed(1234567.891, 2, true) % '1234567.89'
  • text — Format a number as text using an Excel-style format.
  • dollar — Format a number as currency text.