This tip was printed from the Tips for Spreadsheets website at http://tipsforspreadsheets.com/.

Microsoft Excel 2003 Functions and Formulas - Determine if a Number is Odd or Even

Some Microsoft Excel 2003 spreadsheets need to calculate whether or not a value entered in a particular cell is an odd or even number. To determine this, use the =isodd and =iseven functions.

Before using these functions, you must have previously installed the Analysis ToolPak Add-In.

The syntax is simple:

=iseven(VALUE)

VALUE can be a number, cell, result of a formula, etc. Returns TRUE if VALUE is even, FALSE otherwise.

=isodd(VALUE)

VALUE can be a number, cell, result of a formula, etc. Returns TRUE if VALUE is odd, FALSE otherwise.

For example, given the following spreadsheet:


A B
1 5 =isodd(23)
2 22 =iseven(a2)
3 69 =isodd(a1+a3)

The results:

B1: TRUE
B2: TRUE
B3: FALSE



Press the "print" button on your browser or select "File" - "Print" to print this tip. Then, return to Microsoft Excel 2003 Functions and Formulas - Determine if a Number is Odd or Even.
 
Standard disclaimer applies - Read http://tipsforspreadsheets.com/copyright-disclaim.html.