title: How to calculate a value for multiple rows?
body: <p>The problem is incentive and bonus amount is to be divided among a office may be a odd number, for example let Rs 100 will be divided as sales incentive for a office amoung 3 employees. In this case 2 employees will get 33 and 1 employee will get Rs 34, it does not matter who gets 33 or 34, the only thing matters is that the difference should be at minimum and the sum must not exceed than the allotted amount.<br />
  I came up with some basic functions to calculate the amount as<br />
  <a href="https://i.stack.imgur.com/fnHLG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fnHLG.png" alt="enter image description here" /></a></p>
  <p>but the problem is  <strong>how to loop through the employees/rows</strong> ?</p>
  <p><a href="https://i.stack.imgur.com/co2SR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/co2SR.png" alt="enter image description here" /></a></p>