Time Conversion

Lucy89

Board Regular
Joined
Jan 25, 2009
Messages
87
Hi

I have the following problem. I am trying to automate a time-sheet but I am having a problem converting .30hrs to 0.50hrs.

For example:
C4 I have the start time 08.00
D4 I have the finish time 08.30
E4 I have D4-C4 which equals 0.30

C4 I have the start time 08.00
D4 I have the finish time 08.15
E4 I have D4-C4 which equals 0.15

C4 I have the start time 07.45
D4 I have the finish time 08.30
E4 I have D4-C4 which equals 0.85

Is it possible to convert .30 to display 0.50, 0.15 to display 0.25 and 0.85 to display as 0.75.

This would help with adding the weekly hours.


Thank you very much,

L
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,713
Office Version
2010
Platform
Windows
c​
d​
e​
f​
4​
8.00​
8.30​
0.50​
e4: =dollarde(d4, 60) - dollarde(c4, 60)
5​
8.00​
8.15​
0.25​
6​
7.45​
8.30​
0.75​
 

Lucy89

Board Regular
Joined
Jan 25, 2009
Messages
87
c​
d​
e​
f​
4​
8.00​
8.30​
0.50​
e4: =dollarde(d4, 60) - dollarde(c4, 60)
5​
8.00​
8.15​
0.25​
6​
7.45​
8.30​
0.75​

<tbody>
</tbody>
shg that works fantastically well! Thank you so much :)
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,713
Office Version
2010
Platform
Windows
You're welcome.
 

Forum statistics

Threads
1,081,577
Messages
5,359,731
Members
400,545
Latest member
Damntheman30

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top