This Excel tutorial explains how to use the Excel FIX function with syntax and examples.
Let's look at some Excel FIX function examples and explore how to use the FIX function in Excel VBA code:
Description
The Microsoft Excel FIX function returns the integer portion of a number.Syntax
The syntax for the Microsoft Excel FIX function is:Fix( expression )
Parameters or Arguments
expression is a numeric expression whose integer portion is returned.Note
- If the expression is negative, the FIX function will return the first negative number that is greater than or equal to the expression.
Applies To
The FIX function can be used in the following versions of Microsoft Excel:- Excel 2013, Excel 2011 for Mac, xcel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Excel Function
The FIX function can be used in Microsoft Excel as the following type of function:- VBA function (VBA)
Example (as VBA Function)
The FIX function can only be used in VBA code in Microsoft Excel.Let's look at some Excel FIX function examples and explore how to use the FIX function in Excel VBA code:
Fix(210.67) Result: 210 Fix(2.98) Result: 2 Fix(-2.98) Result: -2For example:
Dim LNumber As Double LNumber = Fix(210.67)