title: Add Numbers Until Value Reached
body: <p>I want to have a threshold value in one cell(A1) and take it as a reference for adding cells.</p>
  
  <p>Suppose I have</p>
  
  <p>A1 - <b>10</b><br>
  A2 - 4<br>
  A3 - 2<br>
  A4 - 3<br>
  A5 - 4<br>
  A6 - 6<br></p>
  
  <p>I want to add cells based on A1(Threshold). <br />
  As A1 is 10, cells from A6:A5 should be added - Result:10<br />
  If A1 is 6 then cell A6 should be returned- Result:6<br />
  If A1 is 16 then cells from A6:A3 should be added - Result:19<br /></p>
  
  <p>Is this possible without VBA? Can i get count of number of cells in return along with sum?</p>