Re: Odd or Even
- From: JE McGimpsey <jemcgimpsey@xxxxxxxx>
- Date: Wed, 15 Jun 2005 08:57:18 -0600
Note that this returns true for non-integer values (which are neither
odd nor even).
OTOH, the ATP's ISODD function truncates the number first, so
=ISODD(1.9) ===> FALSE
=ISODD(2.9) ===> TRUE
which seems worse to me.
In article <OcPJAebcFHA.456@xxxxxxxxxxxxxxxxxxxx>,
"Bob Phillips" <phillips@xxxxxxxxxxxxx> wrote:
> Public Function IsOdd(Val) As Boolean
> IsOdd = (Val \ 2) * 2 <> Val
> End Function
.
- Follow-Ups:
- Re: Odd or Even
- From: Bob Phillips
- Re: Odd or Even
- References:
- Odd or Even
- From: PraxisPete
- RE: Odd or Even
- From: MIKE215
- Re: Odd or Even
- From: Bob Phillips
- Odd or Even
- Prev by Date: Re: Simple function made difficult
- Next by Date: Re: active x radio buttons in excel
- Previous by thread: Re: Odd or Even
- Next by thread: Re: Odd or Even
- Index(es):