Excel how to set a given value to date ranges
<p>I need to automatically set a value of 8.45 hours work for the winter schedule (01 October till 15 June) and 6 hours work for a summer schedule (16 June till 30 September) for a time sheet done in Microsoft Excel.</p>

<p>The equation I am trying is the following:</p>

<pre><code>=IF(AND(DATE($G$1,6, DAY(15))&gt;=(DATE($G$1-1, 10, DAY(1))));(DATE($G$1,6, DAY(15))&lt;A8;8.45;"")
</code></pre>

<p>But this keeps on returning formula errors and this still omits the rate value for the summer schedule.</p>

<ul>
<li>$G$1 is the year that is manually inputted for the yearly time sheet.</li>
<li>A8 is the current date.</li>
</ul>

<p>Any guidance into this equation would be appreciate.</p>

<p>With best regards Fab</p>

<p>Edit</p>

<p>Thanks DirkReichel, Scott Craner, Alex Bell, Michael Uray for your great intervention.</p>

<p>I tried all the suggestions but some returned a =VALUE error and some did not omit the winter schedule as from the 1 October -> </p>