October 9, 20196 yr Is there a way to do this? The difference should be as close as possible. I use even number because the number are by pairs. 2 4 6 8 10 Example 18 = 10 and 8 20 = 10 and 10 22 = 12 and 10 36 = 18 and 14
October 9, 20196 yr Author because i cant split them 16 and 16 there both equal. Also if use 17 + 15 i will not work since the number are odd. So i move to 18 by 14.
October 9, 20196 yr I am afraid I don't follow your logic. You split 20 into 10 and 10; they're equal and even. Why can't you split 36 into 18 and 18? They are also equal and even. OTOH, 18 + 14 = 32, not 36 - so this makes no sense to me at all.
October 9, 20196 yr Author 14 minutes ago, comment said: I am afraid I don't follow your logic. You split 20 into 10 and 10; they're equal and even. Why can't you split 36 into 18 and 18? They are also equal and even. OTOH, 18 + 14 = 32, not 36 - so this makes no sense to me at all. Sorry the 20 = 10 + 10 is wrong it should be 12 + 8. Basically we have to split it 60% / 40% something like that. the difference should be as close as 1 to 2 pairs. Edited October 9, 20196 yr by chadski021
October 9, 20196 yr 29 minutes ago, chadski021 said: something like that I am afraid that's not a good enough description. You are asking how to do something, but we don't know exactly what that something is. Maybe you should start by explaining why this is needed. ADDED: Maybe something like this could work for you:: Let ( [ a = 2 * Ceiling ( number / 4 ) ; b = 2 * Floor ( number / 4 ) ] ; If ( a = b ; List ( a + 2 ; b - 2 ) ; List ( a ; b ) ) ) This returns: 18 = 10 + 8; 20 = 12 + 8; 22 = 12 + 10; 36 = 20 + 16. Edited October 9, 20196 yr by comment
October 9, 20196 yr Author 2 minutes ago, comment said: I am afraid that's not a good enough description. You are asking how to do something, but we don't know exactly what that something is. Maybe you should start by explaining why this is needed. Ok, I try my best to explain this. We have a database called shutter. Shutter is installed to window/door and has blades by pairs. ex 20 = 10 pairs. We have scenario that a sliding door has 2 panels. 50% 1 panel can slide and 50% 1 cannot slide. Basically we install the shutter always 50% by 50% if the middle window is open and lock reachable in the middle. But in this case 50% of slide cant be open, So i need to increase at 1 to 2 pairs of blade so its still able to lock it inside. attached is my sample idea
October 9, 20196 yr Okay, then I think my suggestion above should work for you. If you like, you can split the calculation to two fields: 2 * Ceiling ( Number / 4 ) + 2 * not Mod ( Number ; 4 ) and: 2 * Floor ( Number / 4 ) - 2 * not Mod ( Number ; 4 )
October 9, 20196 yr Author thanks @comment it works what a relief. Also What if the difference is 3 to 4 pairs? Edited October 9, 20196 yr by chadski021
October 9, 20196 yr 7 minutes ago, chadski021 said: Also that if the difference is 3 to 4 pairs? Sorry, not sure what you mean by that.
October 9, 20196 yr Author 16 minutes ago, comment said: Sorry, not sure what you mean by that. something like 20 = 16 and 4 30 = 18 and 12
October 9, 20196 yr Wouldn't it be just a matter of adding/subtracting 2 to the results of the above?
October 9, 20196 yr Author 4 minutes ago, comment said: Wouldn't it be just a matter of adding/subtracting 2 to the results of the above? Got it thank you so much.
Create an account or sign in to comment