What Is ISODD Function In Excel?
The ISODD function in Excel identifies the odd numbers and returns TRUE if found, else returns FALSE. The function detects an odd number as a cell value or the result of a formula while performing mathematical calculations. The ISODD Excel function is an inbuilt Information function, so we can insert the formula from the “Function Library” or enter it directly in the worksheet.
For example, we will determine if the numbers are odd values and display the result as logical values, TRUE or FALSE. The table below contains a list of numbers.
📥Download the ready-to-use Excel template to practice this tutorial yourself.
Download Excel TemplateFrequently Asked Questions (FAQs)
There is an ISODD function in Excel in the Formulas tab. To apply the function in a cell, select the cell and go to Formulas → More Functions → Information → ISODD.
We can apply the ISODD function in Excel VBA using the method:
Application.WorksheetFunction.ISODD (Arg1)
For instance, we will find whether the listed numbers are odd using the ISODD and the Excel VBA.
The below table shows a list of numeric values.
The steps to find the odd numbers using the ISODD in Excel VBA are,
• 1: Open the worksheet containing the above table and press Alt + F11 to open the VBA Editor.
• 2: Select the required VBAProject and choose the Module option from the Insert tab to open a new module window.
• 3: Enter the VBA code, shown below, to apply the ISODD() in the target cells.
Sub ISODD_fn()
Dim ws As Worksheet
Set ws = Worksheets(“FAQ_2”)
ws.Range(“B2”) = Application.WorksheetFunction.IsOdd(ws.Range(“A2”))
ws.Range(“B3”) = Application.WorksheetFunction.IsOdd(ws.Range(“A3”))
ws.Range(“B4”) = Application.WorksheetFunction.IsOdd(ws.Range(“A4”))
ws.Range(“B5”) = Application.WorksheetFunction.IsOdd(ws.Range(“A5”))
ws.Range(“B6”) = Application.WorksheetFunction.IsOdd(ws.Range(“A6”))
End Sub
• 4: Click the Run Sub/UserForm icon to execute the code.
Finally, open the active worksheet to view the result in the target cells.
[Output Observation: Cells A2:A3 contain positive and negative integers. The ISODD() in the target cells B2:B3 checks the odd values and returns FALSE and TRUE, as the cell A2 value is even and the cell A3 value is odd.
Cell A4 contains a fractional number 1. The ISODD() checks its decimal equivalent, 1.11, whether it is odd. So, the function truncates the decimal value to 1, and as 1 is an odd number, the function returns TRUE.
In the case of row 5, the ISODD() considers the decimal equivalent of the given cell A5 value of 207%, 2.07, to determine if the specified value is odd. Thus, the function truncates the decimal value to 2. And as 2 is an even number, the function returns FALSE.
On the other hand, cell A6 shows a currency value of $109. And as the specified value is odd, the ISODD() returns TRUE.]
The ISODD function may not work due to the following reasons.
• We provided a non-numeric value as the function argument.
• We applied the ISODD() as an array formula.
Download Template
📥Download the ready-to-use Excel template to practice this tutorial yourself.
Download Excel TemplateRecommended Articles
This has been a guide to ISODD excel function. Here we explain how to use ISODD Formula along with examples & downloadable excel template. You can learn more from the following articles –