Odd() Function

Odd() Function



The Excel ODD function returns the next odd integer after rounding a given number up. The ODD function always rounds numbers up (away from zero) so positive numbers become larger and negative numbers become smaller (i.e. more negative).


Syntax

The syntax for the ODD function in Microsoft Excel is:

=ODD( number )

Parameters or Arguments

number

A numeric value that will be rounded up to the nearest odd integer.

Odd Function Examples

The following spreadsheet shows several examples of the Excel Odd function:

Formulas:


A
B
1

=ODD( 22 )
2
1.22
=ODD( A2 )
3

=ODD( A2+4 )
4
0
=ODD( A4 )
5
-1.3
=ODD( A5 )
6
-10
=ODD( A6 )
7
-3
=ODD( A7 )

Results:


A
B
1

23
2
1.22
3
3

7
4
0
1
5
-1.3
-3
6
-10
-11
7
-3
-3

The above examples show how the odd function always rounds away from zero. I.e. If the supplied number is positive, it is rounded up (more positive), but if the supplied number is negative, it is rounded down (more negative).
If the number argument is exactly equal to zero, as shown in cell B4 of the example spreadsheet above, the Excel Odd function rounds to the positive value +1.

Comments

Popular posts from this blog

Formatting a Range of Cells In Excel VBA

Trunc() Function

BREAK THE PASSWORD OF THE SHEET IN EXCEL