Even and Odd Numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I need a formula that will Add 2 to the numbers in Column A if they are even
and Minus Two if they are Odd.

Thanks in advance
 
Try these:

=A1+2-4*MOD(A1,2)
=A1+2*-1^MOD(A1,2)
=A1+IF(MOD(A1,2),-2,2)
=A1+CHOOSE(1+MOD(A1,2),2,-2)

Regards,
KL
 

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

Back
Top