How to check a number is odd or even in Excel?

Asked By 0 points N/A Posted on -
qa-featured

Hi everyone,

I am now working some numbers given by my friend. Those numbers are in an excel file as shown above.

My task is to check whether these digits are odd or even and the result should be shown in column B, where all digits are in A.

However, I don't have any idea how to do this, can anyone help me?

Thanks.

 

SHARE
Best Answer by Miah Ong
Best Answer
Best Answer
Answered By 0 points N/A #161068

How to check a number is odd or even in Excel?

qa-featured

You can use the following formulae mentioned below,

You could use the formula

"=IF(MOD(A2,2)=1,"odd","even")"

MOD function gives the remainder where A2 is the cell number. In this case the remainder is either 1 or 2 based on which the result is given as even or odd

 

or

You can use this formula

=IF(INT(A1/2)*2 <> A1, "odd", "even")

 

Revert back if you have any problem.

Answered By 0 points N/A #161069

How to check a number is odd or even in Excel?

qa-featured

How to check a number is ODD or EVEN?

There are two solutions available

Solution 1

Use the IF function and the MOD function as follows;

Formula to be used is ;

=IF(MOD(A5,2)=1,"ODD","EVEN")

Here the MOD function returns the remainder after a number is divided by a divisor. If you divide an ODD number by integer 2, then MOD function returns the number 1. then you can apply the if function. If MOD function returns the number 1, then its an ODD number, if MOD function returns number 0, then its an even number.

see attached file "Solution 1"  to know how  the above formula has been used to find out numbers in column A as a ODD number or an EVEN number and returns the result in column B

Solution 2

Use the IF function and the TRUNC function

=IF(A4-(TRUNC(A4/2))*2=1,"ODD","EVEN")

Here the TRUNC function truncate a number to an integer by removing decimal or fractional part of the number. So you divide the number you need to check by 2 using trunc function and again multiply it by 2. then get the difference between the new number and the number you want to check. If the return is 1, then the number is an ODD number, if the return is 0, then the number is an EVEN number.

see attached file "Solution 2"  to know how  the above formula has been used to find out numbers in column A as a ODD number or an EVEN number and returns the result in column B

 

 

Answered By 0 points N/A #161070

How to check a number is odd or even in Excel?

qa-featured

Microsoft Excel is has got wonderful features and inbuilt functions. There are some functions in the Microsoft Excel which will provide Exact solution directly without any complicated formulas.

Direct Method:

MS Excel has got inbuilt functions to check if a value is ODD or NOT. The formula will return the value "TRUE" , if the value is ODD. Else, the result will be "FALSE".

The Formula used to check if a value is "ODD" :

Syntax:

ISODD(number)

Note:

Where "Number" is the value to test. If number is not an integer, it is truncated.

If the value passed is not a number then formula returns the #VALUE! error.

 

Example:

According to spreadsheet in given, the formula in the cell B2 will be =ISODD(A2).

Login/Register to Answer

Related Questions