Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>Note to reader:</em> this question led to multiple solutions some of which were discussed in the comments. Here is a summary of the solution found.</p> <hr> <p><strong>First solution</strong></p> <pre><code>=(HOUR(D15)+MINUTE(D15)/60)/8 </code></pre> <p><strong>Explanation</strong></p> <p>Dates and time in Excel are <strong>stored as serial numbers</strong>, so <code>19:30</code> is actually <code>0.8125</code>.<br> So, if you divide it by <code>8</code>, you will get <code>0.1015625</code>.<br> This latter value is worth <code>2.26 days</code></p> <hr> <p><strong>OP's version</strong> (thanks to Danny Becket (OP)) - see the comments below.<br> This solution now handles hours > 24.</p> <pre><code>=((DAY(D20)*24)+HOUR(D20)+(MINUTE(D20)/60))/8 </code></pre> <p>or better (credits to <a href="https://stackoverflow.com/users/1124287/barry-houdini">Barry Houdini</a>):</p> <pre><code>=((INT(D20)*24)+HOUR(D20)+(MINUTE(D20)/60))/8 </code></pre> <p>The former formula has a limitation for large values, perhaps not relevant here but if <code>D20</code> is 800:00 then you get the wrong answer (7 days rather than 100 days). This is probably because <code>DAY</code> function is giving you calendar day which will "reset" at 31, best to use <code>INT</code> in place of <code>DAY</code>.</p> <hr> <p><strong>Another easily understandable version</strong></p> <p>Divide by the length of the day as a time value:</p> <pre><code>=D15/"8:00" </code></pre> <p>More easily changed if length of workday changes</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload