title: Excel formula to calculate a date that a stock level will reach a predetermined safety stock level
body: <p>I have an inventory/stock consumption report that shows:</p>
  
  <ul>
  <li>stock level (cell E2) and, </li>
  <li>today's date (cell F2)</li>
  </ul>
  
  <p>In cell E3 I have the formula <code>=E2-$C$7</code> which is the inventory level less one day's average consumption (cell C7 = 44).</p>
  
  <p>In cell F3 is today's date plus 24hrs (cell C7 = 44).</p>
  
  <p>This is repeated in column E and F until the date equals 02/09/2016 (which is the the customer's contract expiry).</p>
  
  <p>Using this data I can find out the date when the stock level will reach its predetermined safety level of 1080. In this example the stock level reaches 1082 on 16/04/2015. I find the date by finding the nearest stock figure to the safety stock figure using the following array formula ...</p>
  
  <pre><code>=VLOOKUP(INDEX(E2:E706,MATCH(MIN(ABS(E2:E706-C2)),ABS(E2:E706-C2),0)),E:F, 2, FALSE)
  </code></pre>
  
  <p>Cell C2 equals the safety stock level (1080).</p>
  
  <p>What I would really like to do is calculate this date in a formula without having to populate the stock figures and date range in columns E and F.
  Is there a way for a formula to calculate the date that the stock will reach the safely stock level (or nearest figure to the safety stock) based on a predetermined daily consumption?</p>
  
  <pre><code>    A         B         C         D         E         F
  1
  2                         1080              9838     29/09/2014
  3                   02/09/2016              9794     30/09/2014
  4                          226              9750     01/10/2014
  5                   13/05/2015              9706     02/10/2014
  6                         9383              9662     03/10/2014
  7                           44              9618     04/10/2014
  8                   16/04/2014              9574     05/10/2014
  </code></pre>
  
  <p>Cells C2 to C7 are predetermined values, cell C8 is the array formula above.</p>
  
  <p>Thanks</p>