The FIXED function in Excel is a powerful tool designed to format numbers as text while maintaining a consistent number of decimal places. This function is particularly useful when presenting numerical data in reports or dashboards, where precision and readability are essential.
Syntax
FIXED(number, [decimals], [no_commas])
- number: The numeric value you wish to format.
- decimals: (Optional) The number of decimal places to display. Default is 2.
- no_commas: (Optional) A boolean value that dictates whether to include commas in the formatted output. Default is FALSE (commas included).
Example #1
=FIXED(1234.56789, 2)
This function formats the number 1234.56789 to two decimal places, resulting in “1,234.57”.
Example #2
=FIXED(1234.56789, 2, TRUE)
In this example, the function formats the number to two decimal places without commas, yielding “1234.57”.
Example #3
=FIXED(2.345678, 4)
Here, the number 2.345678 is formatted to four decimal places, resulting in “2.3457”.
Error handling
- VALUE!: This error occurs if the number argument is not a valid numeric value.
- NUM!: This error arises when the decimals argument is a non-integer value or less than -1.
- NAME?: An error indicating that the function name is not recognized, potentially due to a typo.