Time and Duration

Joe976

New Member
Joined
Sep 16, 2019
Messages
7
First, a Disclaimer. I am absolutely 100% new to working with Excel. This exercise I am having an issue with is my first time playing with cell formatting and formulas.

What I want to do, which sounds simple in my head, is input an amount of time into a cell, but have it display as its decimal equivalent. So, if I put 2 hours 30 minutes into cell A2 in the format of '2:30', I would like it to convert that to '2.50' and display it in cell A2. The reasons I am looking for this to happen, is so the displayed 2.50 can be used in other equations throughout the sheet without this funky time thing Excel seems to have.

I am sorry if this question has been answered already. I did try searching, but I must be using wrong keywords. Any advice is greatly appreciated.
 

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.
Hi & welcome to MrExcel.
Changing the format of the cell, does not change the underlying value. Therefore any formulae looking at A2 will see 2:30 not 2.5
 
Upvote 0
Hmmm. That's a stinker. Is there some way I can have a formula that converts the time to a decimal and outputs to the same cell? I think I tried to multiply the time by 24, but it would not work for the same cell. Is there a different work around that I can try?
 
Upvote 0
A cell can have a formula or a value, but not both. You would need to use VBA to do that, although sorting out the correct formulae would probably be a better option.
 
Upvote 0
In Excel, the TIME portion of a date/time value is the decimal part of a number representing the number of days since "Jan 0, 1900"
So any conversions must consider that in the calculation/conversion.
So yes, multiply by 24 (hours). Remember that you may need to convert back down for certain output too.
 
Upvote 0
I guess the easiest way is to just use a calculator to figure the decimal equivalent of the minutes and enter the values as numbers. The easy ones like 15 minutes or 30 minutes would be great if its all I had. Sometimes however, I get oddball stuff like 22 minutes, or 39 minutes. The hours would stay the same, regardless. I did try the special paste option where I entered 24 into a blank cell, copied the cell to the clipboard and special pasted it with value and multiply checked into the cell I needed it in. It worked perfectly. The entire row populated with the correct data. But it only worked once. Perhaps I missed something there? I didn't confirm or save the special paste in the right manner? Thanks for the advice. If nothing else, it is steering me in another direction.
 
Upvote 0
If you need to have the time in decimal format, why not just a helper column with
=A2*24
 
Upvote 0
Helper column? I will have to look into that. Not sure how that would work... Hmm, got my brain ticking though. I may be able to use that and still keep what I was looking for aesthetically. Thanks
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Adding a helper column at somewhere at after the last column with that formula, then hiding the column worked perfectly. Did exactly what I was looking for. Thank you folks your help and advice.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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