MKTetzlaff
New Member
- Joined
- Apr 8, 2006
- Messages
- 20
Hi:
I think that I am going about this wrong.
I have the length of a needed part (balance rod) in cell L127=rounddown((L108-2),0). We have switched vendors and now are only using even length balance rods.
L108 contains the product height divided by 2.
L127 (balance length) can never be less than 10 or more than 48.
L127 always needs to produce a even number but cannot be more than one less than actual number.
example: L127 = 27.375 --> rounddown to 27 (odd needs to be 26 so substract 1)
example: L127 = 36.875 --> rounddown to 36 (ok because it is even so substract 0)
example: L127 = 37.000 --> rounddown to 37 (odd needs to be 36 so substract 1)
If the part length (L127) is an even number, I do not need to do anything. If cell L127 is an odd number, I need to round down one / substract one to get to the even number below it.
I was thinking of trying to make the rounddown(), fix(), int() work in some combination but it also changes even numbers. This seems way too complicated for what appears to be easy on the surface.
I think I need some way to test if L127 is odd, maybe a If=odd/Then substract 1, If=even/Then substract 0.
I appreciate any help you guys can provide either on a way to test if a number (L127) is odd or just making this work in general.
Thanks in advance,
- Mike T.
I think that I am going about this wrong.
I have the length of a needed part (balance rod) in cell L127=rounddown((L108-2),0). We have switched vendors and now are only using even length balance rods.
L108 contains the product height divided by 2.
L127 (balance length) can never be less than 10 or more than 48.
L127 always needs to produce a even number but cannot be more than one less than actual number.
example: L127 = 27.375 --> rounddown to 27 (odd needs to be 26 so substract 1)
example: L127 = 36.875 --> rounddown to 36 (ok because it is even so substract 0)
example: L127 = 37.000 --> rounddown to 37 (odd needs to be 36 so substract 1)
If the part length (L127) is an even number, I do not need to do anything. If cell L127 is an odd number, I need to round down one / substract one to get to the even number below it.
I was thinking of trying to make the rounddown(), fix(), int() work in some combination but it also changes even numbers. This seems way too complicated for what appears to be easy on the surface.
I think I need some way to test if L127 is odd, maybe a If=odd/Then substract 1, If=even/Then substract 0.
I appreciate any help you guys can provide either on a way to test if a number (L127) is odd or just making this work in general.
Thanks in advance,
- Mike T.