"E" for even numbers. "O" for odd numbers.

G

Guest

hi there

I need a formula that will produce "E" or "O" for even or odd numbers in
columnA. I have tried messing around with =if(A1=iseven,"E","O") but not to
much success. What am i missing here?
Thanks!
 
M

Mangesh Yadav

=IF(MOD(A1,2)=0,"E","O")

and to take care of blanks.

=IF(A1="","",IF(MOD(A1,2)=0,"E","O"))

Mangesh
 
G

Guest

hey ppl,

both the =if(iseven....etc) and =if(mod...etc) worked great! thanks
Mangesh Yadav has warned me about blanks...and it is a problem. Any cells
left blank are considered Even. What should i do?
Thanks
 
M

Mangesh Yadav

As I said in my earlier post, check for blanks. Use:

=IF(A1="","",IF(ISEVEN(A1),"E","O"))

Mangesh
 
C

CLR

And, this checks for TEXT........

=IF(ISNUMBER(A1),IF(A1="","",IF(ISEVEN(A1),"E","O")),"")

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top