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
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
Use:
=A1+IF(MOD(A1,2)=0,2,-2)
Mangesh
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
"Andrew" <[email protected]> wrote in message
news:[email protected]...
> 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 this =A1+ISEVEN(A1)*2-ISODD(A1)*2
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email
"Andrew" <[email protected]> wrote in message
news:[email protected]...
> 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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks