Re: Odd or even
Use the MOD function. This gives you the remainder of one number divided by another. So if you take your variable and mod it by 2... see below
x = Variable MOD 2
If x = 0 then variable is even else it is odd ....
Originally posted by harmen
Can somebody tell me how I can check or a variable is odd or even. I want to use this in a If ... then .. else staemant
Life is too short to be sane or sensible. Weird people rule and normal people suck