If A1 value is an odd number than b1 =1

E

eagerowl

If the value in cell A1 is an odd number I want B1 to display number 1
if the value in cell A1 is an even number, I want
B1 to display number 0
 
R

Ragdyer

Interesting question if we include decimals.

Is 2.1 even or odd?
Is 3.2 even or odd?

I believe that this perhaps probably better covers the generic question of
the OP:

=MOD(RIGHT(A1),2)
 
A

AlfD

Hi!

I have suffered a seismic shock.

Never in my life (long as it has been) have I contemplated the notio
that an odd or even number could/would be other than an odd or eve
integer. Am I losing the plot? Or is there a new orthodoxy?

Al
 
H

Harlan Grove

Ragdyer said:
Interesting question if we include decimals.

Is 2.1 even or odd?
Is 3.2 even or odd?

Both are nonterminating binary fractions, FWIW. And if 2.1 is 'odd', what's
2.10?

Even and odd are characteristics of integers only. Fractions aren't either
(other than even or odd multiples of some other fraction).

So likely the most general approach is either

=MOD(INT(x),2)

or

=MOD(TRUNC(x),2)
 
G

Guest

Use the Mod operator with 2 as the divider, if it leaves
remainder then it is Odd number
 
R

RagDyeR

All this math terminology is way beyond this college drop-out.

Mind you, I'm not arguing here, but I honestly wonder how many people
(average) would answer that 2.1 is *not* a "number".

I do stand corrected.

What did light a bulb for me though Harlan, was the odd - even,
2.1
2.10
That "clicked" (pun intended) a little more deeper understanding.<g>
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------


Ragdyer said:
Interesting question if we include decimals.

Is 2.1 even or odd?
Is 3.2 even or odd?

Both are nonterminating binary fractions, FWIW. And if 2.1 is 'odd', what's
2.10?

Even and odd are characteristics of integers only. Fractions aren't either
(other than even or odd multiples of some other fraction).

So likely the most general approach is either

=MOD(INT(x),2)

or

=MOD(TRUNC(x),2)
 
H

Harlan Grove

...
...
Mind you, I'm not arguing here, but I honestly wonder how many people
(average) would answer that 2.1 is *not* a "number".
...

You're getting too cute. Only integers may be even or odd. It's categorically
false that all numbers (unqualified) must be either odd or even. Just extend
this falsehood to complex numbers. Is 6+8i even? Which of 3+2i or 3+5i is odd?

If the average person hasn't a clue that numbers with nonzero fractional parts
are neither odd nor even, then should that average person be allowed within 100
meters of a computer running Excel?
What did light a bulb for me though Harlan, was the odd - even,
2.1
2.10
That "clicked" (pun intended) a little more deeper understanding.<g>

Then you'd love the mechanics of working with transfinite numbers, part of which
involves the proven contention that any real number with finite digit decimal
representation, e.g., 2, may be represented as an unending number with
fractional piece in which the lowest order digit in the finite representation is
reduced by one (with carry through the more subsequent digits as needed)
followed by an unending sequence of 9s. That is,

2 == 1.99999999999999999999999999999999999999...

So all numbers are odd! [A falacy. On the other hand, 'all mathematicians are
odd' is necessarily true.]
 
D

Dave Peterson

There's a Dave PetersEn who sits about 50 feet from my cubicle at work.

We're known as the Odd and Even Peters*ns.

I tell him that others refer to one of us as the good looking peters*n.

We're both happy with that description.

Hmmmm...
 
Top