Excel ODD Function

Syntax

The ODD formula has only one critical parameter: number.

Compulsory Parameter:

  • number: A numeric value that will be rounded to the nearest odd integer.

How to use the ODD Function in Excel?

Example #1

In this example, let us consider a set of positive integers 40, 18, 10, 26, 19, 20, 14, 17, 30, and 27 to understand the working of the ODD function. Now, apply the ODD formula in the cell, as shown in the below table. This function will round up all values to the nearest odd numbers like 41, 19, 11, 27, 19, 21, 15, 17, 31, and 27.

Example #2

In this example, we take the sample of negative integers and then apply the ODD formula to them.

Let us consider a set of positive integers -40, -18, -10, -26, -19, -20, -14, -17, -30 and -27 to understand the working of the ODD function. Now, apply the ODD formula in the cell as shown in the below table. This function will round up all values to the nearest odd numbers as -41, -19, -11, -27, -19, -21, -15, -17, -31 and -27.

Example #3

In this example, let us take positive point values for the ODD.

Here, point value first-round off to near integer value than odd works. For example, for value 27.9, the odd returns the 29 as output because 27.9 was first considered as >27 ~ 28, then odd rounded up to the nearest integer value.

For the below table values 40.18, 18.1, 10.26, 26.19, 19.19, 19.14, 14.17, 17.3, 30.27 and 27.9 the output will be 41, 19, 11, 27, 19, 21, 15, 17, 31 and 29.

Example #4

In this ODD function, for example, let us take negative point values for the ODD.

Let us consider a set of negative point values -40.18, -18.1, -10.26, -26.19, -19.19, -19.14, -14.17, -17.3, -30.27 and -27.9 to understand the working on ODD. Now, apply the ODD formula in the cell as shown in the below table. This function will round up all values to the nearest odd numbers as -41, -19, -11, -27, -21, -21, -15, -19, -31 and -29.

The ODD can be used as a VBA function.

Dim ODDnumber As Long

ODDnumber = Application.worksheetfunction.odd(“14”)

Msgbox(ODDnumber) // Return the nearest odd value in message box.

The output will be “15” and printed in the message box.

Things to Remember

  • The ODD Excel function may return the # VALUE! Error if the supplied number is a non-numeric value.Irrespective of the value (+ve and –ve) of the number, a value is rounded up and adjusted away from zero.If the number is an odd integer, no rounding occurs.

This article is a guide to Excel ODD Function. We discuss the ODD function and how to use it, along with an Excel example and downloadable templates. You may also look at these useful functions in Excel: –

  • Excel Even FunctionExcel Even FunctionEVEN is an Excel function that rounds any number to the nearest even value. This function can be used with a negative or positive number, and the keyboard shortcut is =EVEN (number provided as an argument).read moreBreak-Even Point in ExcelBreak-Even Point In ExcelBreak-Even Point in Excel is a neutral point where the revenue & expenditures of a company are equal, implying that there is no net profit or net loss. read moreABS in Excel | ExamplesABS In Excel | ExamplesABS Excel function or Absolute function is used to calculate the absolute value of a given number. The negative numbers given as input are changed to positive numbers and if the argument provided to this function is positive, it remains unchanged.read moreRAND Formula in ExcelRAND Formula In ExcelThe RAND function in Excel, also known as the random function, generates a random value greater than 0 but less than 1, with an even distribution among those numbers when used on multiple cells. read moreCOMBIN Function in ExcelCOMBIN Function In ExcelCOMBIN function in excel is the combination function to calculate possible combinations for two given numbers. This function takes two arguments. One is the number and number chosen. If the number is 5 and the number chosen is 1, then there are 5 combinations and 5 as a result.read more