title: How can I apportion a total by percentages where each cell is an integer and they sum to exactly the original total?
body: <pre><code>      Date
  Nov-11     Dec-11
  50         102
  
     Percent
  0          0
  0          34
  34         33
  33         33
  33         0
  
    Apportion
  0          0
  0          35
  17         34
  16         34
  16         0
  
       Sum
  49         103
  </code></pre>
  
  <p>The 5 percentages of the first column correspond to splitting up the 50 above into integer parts in the 5 cells under the apportion header. The results in there have come from a simple Round(x*%,0). I want all of the values below to sum to the 50 exactly in the first column. This can be accomplished by altering any number of non-zero values in the Apportion section.</p>
  
  <p>If it's possible to do this with formulas I haven't been able to figure out how. Every thing I try is a circular reference. The problem is that any of the percentages can be 0 so I can't just create a bucket one that accounts for the under/overflow.</p>
  
  <p>Please let me know if more information is needed. This is the first time I've asked a question ever on SO. I can't attach a picture, so I've attempted to draw the table above with code.</p>