excel - If statement to choose a value -



excel - If statement to choose a value -

hi have next code:

if numcolyo = .startpoint.y = buwidth / 2 + ccfacoy else .startpoint.y = buwidth / 2 end if

but doesn't expect do. code works though. illustration if numcolyo=4 want first statement true: startpoint.y = buwidth / 2 + ccfacoy

if numcolyo=3 want sec statement true: startpoint.y = buwidth / 2

have written wrong? thankful kind of help :)

don't think there keyword in vba. seek modulus operator returns remainder of partition operation:

if numcolyo mod 2 = 0 .startpoint.y = buwidth / 2 + ccfacoy else .startpoint.y = buwidth / 2 end if

when divided 2 has no remainder, even.

excel vba

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -