Summing based on >=date
<p>I am creating a running targeting program for the staff at work and I am stuck on running a progressive tally.</p>

<p>I'll explain what I have first.  </p>

<pre><code>A1=TODAY()-DAY(TODAY())+1)
A2==TODAY()-DAY(TODAY())+1
A3=(A1+7), A4=(A2+7)
</code></pre>

<p>It gives me a progressive date log of 7 days.</p>

<p>Column <code>B</code> is the names of the salesperson.</p>

<p><code>C1</code> = Total sales (this will be updated every day automatically from a generated report using a data link).</p>

<p>What I need is for sales to copy from <code>C1</code> (TOTAL SALES) to <code>C2</code>, this is easy enough. Once the first 7 days have gone, I need to start summing up the sales from the 8th day onwards and put into <code>C3</code>. So if <code>A3</code> is greater than or equal to <code>A1</code>, I need <code>C3</code> to equal sales over and above <code>C2</code>. eg. Between the 1st and 7th we sell $10000, <code>C2</code> = $10000. From the 8th to the 14th, we sell another $5000. I need <code>C2</code> to show $10000, and <code>C3</code> to show $5000. From the 15th to the 21st we sell $7000. <code>C2</code> = $10000, <code>C3</code> = $5000, <code>C4</code> = $7000, <code>C1</code> =$22000.</p>

<p>Forgot to add, once a date has passed I need it to lock sales for that period. So if on the 7th we were on the $10000, Once the figures for the 8th are imported, I need the $1000 to be locked and the additions done for the following week.</p>