Microsoft KB Archive/61274

{|
 * width="100%"|

Excel: Worksheet Function to Determine if Integer Even or Odd

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
 * Microsoft Excel for OS/2 versions 2.2, 2.21, 3.0

-

SUMMARY
The following is a worksheet formula to determine whether an integer in cell A1 is even:

  =IF(MOD(A1,2)=0,&quot;even&quot;,&quot;odd&quot;)

Note that if cell A1 is empty, this formula will return &quot;even&quot;. If A1 contains a text value, a #VALUE! error will be returned.

Additional query words: 2.00 2.01 2.10 2.20 2.21 2.0 2.1 2.2 3.0 4.0

Keywords :

Version :

Platform :

Issue type :

Technology :