Odd/Even numbers

  • Thread starter Thread starter Amanda
  • Start date Start date
A

Amanda

Hi,

We want a formula that will identify odd and even numbers
at the end of a string.

1234 - even
1235 - odd
1236 - even
1237 - odd

etc, etc.

How do we write the formula to identify it as 'odd'
or 'even' ????

Many thanks

Amanda
 
Hi
if your numbers are in A1 use
=IF(ISODD(A1),"odd","even")

or
=IF(MOD(A1,2)=0,"even","odd")
 
As noted in Help for ISODD, you must have the Analysis ToolPak
installed, otherwise you get a #NAME? error.

Jerry
 
You say "end of a string" which makes me think you are analyzing tex
strings, because if the last character of a numerical value is odd
then the value itself is odd.

If you're analyzing text strings,

=IF(MOD(RIGHT(A1,1),2)>0,"odd","even")

works
 
Back
Top