Convert Downloaded Hours and Minutes from Date and Time Back To Hours

OilEconomist

Active Member
Joined
Dec 26, 2016
Messages
439
Office Version
  1. 2019
Platform
  1. Windows
Thanks in advance for any assistance provided by anyone.

Please excuse the title as it should state "Convert Downloaded Minutes and Seconds from Date and Time Back To Minutes and Seconds.

The solution to this can be VBA or just simple Excel.
The following is a sample set of data which I have downloaded (Column A) which is suppose to be minutes and seconds. Please note that the original data set is much larger than this or I would just manually make the change.
Book2
ABCDEFG
1DOWNLOADED DATAMANUALFORMULA
2MINUTESSECONDSMINUTESSECONDS
319:28:001928197:28 PM
427:50:00275033:50 AM
519:481948197:48 PM
623:4623462311:46 PM
725:19:00251911:19 AM
818:431843186:43 PM
93:5035033:50 AM
Sheet1
Cell Formulas
RangeFormula
F3:F9F3=HOUR(A3)
G3:G9G3=TIME(HOUR(A3), MINUTE(A3), SECOND(A3))


I need to extract the minutes into column C and the seconds in column D. For this small sample size I have manually done it (Columns C & D). The issue is that once the data is pasted, it is stored as a date and time format and I cannot figure out what formula to use to extract the minutes and seconds.

In column F I use an hour formula to extract the hours, but if it's greater than 24 minutes it only calculates everything after the 24 minutes (27 minutes shows as 3 minutes) (see Row 4 and Row 9 issue). In column G I was trying to use a formula for the minutes, but could not figure anything out to give me just minutes.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Minutes
=MINUTE(TIMEVALUE("00:"&LEFT(A3,5)))

Seconds
=SECOND(TIMEVALUE("00:"&LEFT(A3,5)))
 
Last edited:
Upvote 0
Minutes
=MINUTE(TIMEVALUE("00:"&LEFT(A3,5)))

Seconds
=SECOND(TIMEVALUE("00:"&LEFT(A3,5)))
Hi @AlphaFrog. It looks like the data did not copy over properly so that did not work. I tried again and it did not work. What was in my original post is what's visible to the human eye. When you view the contents of the cell, it looks as follows:

and this is what is in the actual cells of column A:
Book2
ABCDEFG
1DOWNLOADED DATAMANUALFORMULA
2MINUTESSECONDSMINUTESSECONDS
31/1/1900 7:28:00 PM1928197:28 PM
41/1/1900 3:50:00 AM275033:50 AM
57:48:00 PM1948197:48 PM
611:46:00 PM23462311:46 PM
71/1/1900 1:19:00 AM251911:19 AM
86:43:00 PM1843186:43 PM
93:50:00 AM35033:50 AM
Sheet1
Cell Formulas
RangeFormula
F3:F9F3=HOUR(A3)
G3:G9G3=TIME(HOUR(A3), MINUTE(A3), SECOND(A3))
 
Upvote 0
A4 = "01/01/1900 03:50:00" = 1d + 3h50' = 27h50' ==> /60 = 27m50s
A1 = "01/01/1900 19:28:00" = 1d + 19h28' = 43h28' ===>/60 = 43m28s
Why did you expect it to be 19h28' ??
Book1
ABCDEFG
1DOWNLOADED DATAMANUALFORMULA
2MINUTESSECONDSMINUTESSECONDS
301/01/1900 19:2819284328
401/01/1900 03:5027502750
57:48:00 PM19481948
611:46:00 PM23462346
701/01/1900 01:1925192519
86:43:00 PM18431843
93:50:00 AM350350
Sheet2
Cell Formulas
RangeFormula
F3:F9F3=MINUTE($A3/60)
G3:G9G3=SECOND($A3/60)
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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