I have a simple distribution code that distributes product to different places based on a changing percentage. It has to be in whole numbers so there is always a small remainder by rounding down. To distribute the remainder evenly I want to go down the list and just +1 each place until the remainder is gone. I have this:
This does what I want but only checks the remainder total on loop. If it is 3, it works fine. If it is 2, it adds 3(1/1/1). If it is 4, it will add 3, loop, then add another 3.Please Login or Register to view this content.
How can I get the Do While to check the total of the remainder after every If>Then instead of after the loop?
Bookmarks