Time conversion

ByteMe

Board Regular
Joined
Mar 9, 2005
Messages
85
Hi there,

Is it possible to convert numbers such as '7.5' (7 hours & 30 mins) to a correct time of 07:30 & then convert it to a text format of 00730.

Basically cell A1 has the value of 7.5 & i need cell B1 to show 00730

I'm really struggling with this one so any help would be greatly appreciated!

Kind regards
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
For a completely different approach
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Target.Column <> 1 Then Exit Sub
    Application.EnableEvents = False
    Target.Offset(0, 1).Value = Evaluate("=dollarfr(" & Target & ",60)")
    Application.EnableEvents = True
End Sub

Custom format column B as
## "hrs".00 "mins."

Analysis Toolpak required. Also, Dollarde can be used to go the other way
Reference http://www.mrexcel.com/board2/viewtopic.php?t=174642

lenze
 
Upvote 0

Forum statistics

Threads
1,222,675
Messages
6,167,538
Members
452,118
Latest member
djjamesp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top