Purpose

Return value

Syntax

=ISODD(value)
  • value - The numeric value to check.

Using the ISODD function

The ISODD function tests for odd numbers. ISODD takes one argument , value , which should be a numeric value or a cell reference. When value is an odd number, ISODD returns TRUE. When value is an even number, ISODD returns FALSE. If value is not numeric, ISODD will return the #VALUE error. Only the integer portion of value is evaluated, decimal values are truncated.

Examples

The ISODD function returns TRUE or FALSE:

=ISODD(4) // returns FALSE
=ISODD(3) // returns TRUE
=ISODD(0) // returns FALSE

If cell A1 contains 11, the formula below returns TRUE:

=ISODD(A1) //returns TRUE

Only the integer portion of value is tested. If value is a decimal number, the decimal portion is truncated:

=ISODD(4.1) // returns FALSE
=ISODD(0.33) // returns FALSE
=ISODD(7.4) // returns TRUE

Notes

  • If value is not numeric, ISODD will return the #VALUE error.
  • Only the integer portion of value is tested; decimal values are truncated.
  • Use the ISEVEN function to test for even numbers.

Purpose

Return value

Syntax

=ISREF(value)
  • value - The value to check.

Using the ISREF function

The ISREF function returns TRUE to test for a reference in a formula. The ISREF function takes one argument , value , to test. If value is a valid cell reference, range , or named range , ISREF returns TRUE. If value is not a reference, ISREF returns FALSE. ISREF does not evaluate the contents of a reference, just the reference itself.

Examples

ISREF returns TRUE when value is a reference and FALSE if not:

=ISREF(A1) // returns TRUE
=ISREF(A1:C1) // returns TRUE
=ISREF(Sheet1!A1) // returns TRUE
=ISREF("apple") // returns FALSE
=ISREF(100) // returns FALSE
=ISREF(ZZZ1) // returns FALSE

Some functions, like INDEX and OFFSET, can return a reference. As long as the reference is valid, ISREF returns TRUE:

=ISREF(INDEX(A:A,10)) // returns TRUE
=ISREF(OFFSET(A1,1,1)) // returns TRUE

To evaluate a reference as text (i.e. “A1”), use the INDIRECT function:

=ISREF(INDIRECT("A1")) // returns TRUE
=ISREF(INDIRECT("ZZZ1")) // returns FALSE

Notes

  • Use the INDIRECT function with ISREF to evaluate a reference as text.