Good day,
A guy called Razvan posted a reply on Stack Overflow on 14th Feb 2014, showing how random numbers could be generated which would sum to a specified total . I was wondering however if this could be taken two steps further. In my attachment I have in the grey area Razvan's part. The random numbers will always tally up to 1000 in this case. To the right of that are my additions. Would it be possible either by code or formulae, (I would guess code) to have just one set of numbers generate, then have the code looking at E22 and compare the difference between E22 and the desired figure, which is in G1, determine the best possible place in columns B and C (or B or C),to make adjustments (By calculations), then make the adjustment, and then step 2, to compare cells F22 with H1 and do the same adjustments. IMPORTANT: The second adjustment should be made looking at columns C and E or (C only or E only). Please try and help, this is for a major project I need to get done in the course of about one week...I really appreciate and rate your assistance very highly on this one. Even if we could get the first calculation part going, it would already be a fantastic start.
Bookmarks