ISODD is a Google Sheets function that returns TRUE if a given number is odd and FALSE if it is even. To use it, type =ISODD(A1) in a cell, replacing A1 with the number or cell reference you want to test. The function is useful for conditional formatting, filtering, and data validation based on parity.
What You'll Need
- A Google account and access to Google Sheets (free with any Google account).
- A spreadsheet with at least one numeric value to test.
- Basic familiarity with entering formulas in a cell.
Step-by-Step
- Open your spreadsheet. Go to Google Sheets and open the file where you want to use ISODD. If you are starting fresh, create a new blank spreadsheet.
- Select the cell for the result. Click the cell where you want the TRUE/FALSE output to appear. This can be any empty cell.
- Start the formula. Type
=ISODD(into the cell. As you type, Google Sheets may show a suggestion for the function; you can press Tab or Enter to accept it, but typing manually is fine. - Enter the value or cell reference. Inside the parentheses, type the number you want to test (e.g.,
7) or click a cell that contains a number (e.g.,A1). For example:=ISODD(A1)or=ISODD(7). You can also use a calculation like=ISODD(3+2). - Close the parenthesis and press Enter. The cell will display TRUE if the number is odd, FALSE if it is even. If the cell contains text or is empty, ISODD returns an error (#VALUE!).
- Copy the formula down (optional). If you have a column of numbers, drag the fill handle (small square at the bottom-right of the cell) down to apply the formula to other rows. Relative references adjust automatically.
- Use the result in other formulas (optional). You can nest ISODD inside IF, e.g.,
=IF(ISODD(A1), "Odd", "Even"), or combine with conditional formatting to highlight odd numbers.
Common Mistakes
- Testing non-numeric values. ISODD only works with numbers. If the cell contains text, a date stored as text, or is blank, you will get a #VALUE! error. Ensure the input is a number or a reference to a numeric cell.
- Forgetting the parentheses. The formula must include opening and closing parentheses:
=ISODD(A1), not=ISODD A1. - Using a range instead of a single cell. ISODD expects a single value. If you provide a range like
A1:A10, it will return an error unless used inside an array formula (e.g.,=ARRAYFORMULA(ISODD(A1:A10))). - Misunderstanding negative numbers. ISODD works with negative numbers: -3 is odd, so
=ISODD(-3)returns TRUE. The sign does not affect parity. - Expecting ISODD to round decimals. ISODD does not round; it checks the exact value. A decimal like 3.5 is not an integer, so ISODD returns FALSE because it is not an odd integer. If you need to test the integer part, use
=ISODD(INT(A1)).
Tips
- Combine with IF for custom labels. Use
=IF(ISODD(A1), "Odd", "Even")to display friendly text instead of TRUE/FALSE. - Use with conditional formatting. Select your range, go to Format > Conditional formatting, choose "Custom formula is", and enter
=ISODD(A1)(adjust the reference to the top-left cell of your range). This highlights odd numbers automatically. - Pair with ISEVEN for completeness. ISEVEN is the counterpart; use it when you need to test for even numbers.
- Handle errors gracefully. Wrap in IFERROR:
=IFERROR(ISODD(A1), "Not a number")to avoid #VALUE! errors when cells contain text. - Remember that ISODD returns a Boolean. The result is TRUE or FALSE, which can be used in further logical tests or counted with COUNTIF.
Troubleshooting
- #VALUE! error: The input is not a number. Check that the cell contains a numeric value, not text. If the cell looks numeric but is formatted as text, convert it (e.g., using VALUE function or re-entering the number).
- #NAME? error: The function name is misspelled. Ensure it is
ISODD, notISODDwith extra spaces or wrong case (though case does not matter). - Formula not updating: If you change the input cell, the result should update automatically. If not, check that automatic calculation is enabled (File > Settings > Calculation).
- Unexpected FALSE for odd numbers: The number might be stored as text. Use
=ISODD(VALUE(A1))to convert. Also, decimals are not odd integers; use INT to truncate. - Array formula issues: If you need to test a range, use
=ARRAYFORMULA(ISODD(A1:A10))and enter it in a single cell; it will spill results. Alternatively, drag the formula down.
Frequently Asked Questions
What does ISODD return for zero?
Zero is even, so ISODD(0) returns FALSE.
Can ISODD handle negative numbers?
Yes, ISODD(-3) returns TRUE because -3 is an odd integer. The sign does not affect parity.
Does ISODD work with decimals?
No, ISODD only returns TRUE for odd integers. A decimal like 3.5 returns FALSE because it is not an integer. Use INT to test the integer part.
How do I use ISODD with a range of cells?
ISODD expects a single value. To apply it to a range, either copy the formula down or use ARRAYFORMULA: =ARRAYFORMULA(ISODD(A1:A10)).
What is the difference between ISODD and ISEVEN?
ISODD returns TRUE for odd numbers, while ISEVEN returns TRUE for even numbers. They are complementary.
Can I use ISODD in conditional formatting?
Yes. In conditional formatting, choose "Custom formula is" and enter =ISODD(A1) (adjust the cell reference to match the top-left of your selected range).