title: Excel: Hours/Minutes to Decimal Values
body: <p>Before anything else, I'm using Excel 2010.</p>
  
  <p>I'm trying to simplify a process to get information from a report I run that generates the time in seconds. I need decimal time instead of hours and so far this is the only solution I could come up with.Example:</p>
  
  <p>A1 contains the time in seconds.</p>
  
  <pre><code>1843 (seconds)
  </code></pre>
  
  <p>B1 contains the formula to conver the seconds into hours</p>
  
  <pre><code>=B1/(1440*60) This gives me 0:30:43
  </code></pre>
  
  <p>Then I have to calculate how much time over 0:30:00 is left, which is what I need.</p>
  
  <pre><code>=IF(B1&lt;$H$1,"ON TIME",SUM(B1-$H$1))
  </code></pre>
  
  <p>This formula I have it placed in C2, H1 contains the time limit 0:30:00 and the cell is formatted as [h]:mm:ss. which I use to calculate what's the time over the limit.</p>
  
  <p>Once I have the time over the limit, in this case 0:00:43 seconds, I have to conver this to decimals to get what I really need out of all this and for that I use the following formula.</p>
  
  <pre><code>=C2*60*24
  </code></pre>
  
  <p>This formula (placed in R1) gives me the result 0.72 but I have to copy this result and paste it on another cell and when I do that and paste the values, I get this. 0.71666666666667. even if the cell is formatted as number with 2 decimal places. it only affects what I see in the cell, not the actual value that's in the cell.</p>
  
  <p>Now, to fix that and get the right number. I have another formula place in S1 to give me the right number which after copied and pasted as value, I get the actual value I need. </p>
  
  <pre><code>=TRUNC(R1,2)
  </code></pre>
  
  <p>This gives me 0.71 and if I copy and paste what I get from that formula and paste it as value, I get to keep 0.71.</p>
  
  <p>Is there any way to shortten this process thru VBA or any other formula altenatives?</p>
  
  <p>Thank you for the help.</p>