Skip to main content

FIXED function

Description

The FIXED Function rounds a number to the specified number of decimals, formats the number in decimal format using a period and commas, and returns the result as text.

Syntax

FIXED(number, [decimals], [no_commas])

Parameters

Number Required. The number you want to round and convert to text.
Decimals Optional. The number of digits to the right of the decimal point.
No_commas Optional. A logical value that, if TRUE, prevents FIXED from including commas in the returned text.

Remarks

  • Numbers in Microsoft Excel can never have more than 15 significant digits, but decimals can be as large as 127.
  • If decimals is negative, number is rounded to the left of the decimal point.
  • If you omit decimals, it is assumed to be 2.
  • If no_commas is FALSE or omitted, then the returned text includes commas as usual.
  • The major difference between formatting a cell containing a number by using a command (On the Home tab, in the Number group, click the arrow next to Number, and then click Number.) and formatting a number directly with the FIXED function is that FIXED converts its result to text. A number formatted with the Format Cells command is still a number.

Examples

The example may be easier to understand if you copy the example data (include header) in the following table, and paste it in cell A1 of a new Excel worksheet. If you need to, you can adjust the column widths to see all the data.

Formula Result Description
=FIXED(1234.567,1) 1,234.6 Rounds the number 1 digit to the right of the decimal point, with commas.
=FIXED(1234.567,1,0) 1,234.6 Rounds the number 1 digit to the right of the decimal point, with commas.
=FIXED(1234.567,1,1) 1234.6 Rounds the number 1 digit to the right of the decimal point, without commas.
=FIXED(1234.567,,) 1,234.57 Rounds the number 2 digit to the right of the decimal point, with commas.
=FIXED(1234.567) 1,234.57 Rounds the number 2 digit to the right of the decimal point, with commas.
=FIXED(1234.567,,1) 1234.57 Rounds the number 2 digit to the right of the decimal point, without commas.
=FIXED(1234.567,-1) 1,230 Rounds the number 1 digit to the left of the decimal point, with commas.
=FIXED(1234.567,-1,1) 1230 Rounds the number 1 digit to the left of the decimal point, without commas.
=FIXED(1234.567,-1,0) 1,230 Rounds the number 1 digit to the left of the decimal point, with commas.
=ISTEXT(FIXED(1234.567,1)) TRUE FIXED function returns the result as text.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>