Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
DA DA is offline
external usenet poster
 
Posts: 104
Default Convert numbers to hrs: min

Hello
How can I convert the following numbers into hrs:min?
I have tried every possible format (including custom) and I do not get the
results I want (e.g. 15:45 18:40)
I want to get the difference in time between these numbers.
Thank you

1545 1840
2015 2300
2045 2105
1700 1815
1825 1840
1850 2000
1835 1900

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Convert numbers to hrs: min

Assuming your values are in columns A & B, I used this formula in C1 to get
the result you are looking for:

=TEXT((LEFT(B1,2)&":"&RIGHT(B1,2))-(LEFT(A1,2)&":"&RIGHT(A1,2)),"HH:MM")

Using your sample data, these are the results:

1545 1840 02:55
2015 2300 02:45
2045 2105 00:20
1700 1815 01:15
1825 1840 00:15
1850 2000 01:10
1835 1900 00:25

Hope that helps!

"da" wrote:

Hello
How can I convert the following numbers into hrs:min?
I have tried every possible format (including custom) and I do not get the
results I want (e.g. 15:45 18:40)
I want to get the difference in time between these numbers.
Thank you

1545 1840
2015 2300
2045 2105
1700 1815
1825 1840
1850 2000
1835 1900

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 527
Default Convert numbers to hrs: min

Nate

Your formula gives the correct result, but as text. Could use:

=VALUE(TEXT((LEFT(B1,2)&":"&RIGHT(B1,2))-(LEFT(A1,2)&":"&RIGHT(A1,2)),"HH:MM"))

then format the number as time

Regards
Peter

"Nate @ CST Global" wrote:

Assuming your values are in columns A & B, I used this formula in C1 to get
the result you are looking for:

=TEXT((LEFT(B1,2)&":"&RIGHT(B1,2))-(LEFT(A1,2)&":"&RIGHT(A1,2)),"HH:MM")

Using your sample data, these are the results:

1545 1840 02:55
2015 2300 02:45
2045 2105 00:20
1700 1815 01:15
1825 1840 00:15
1850 2000 01:10
1835 1900 00:25

Hope that helps!

"da" wrote:

Hello
How can I convert the following numbers into hrs:min?
I have tried every possible format (including custom) and I do not get the
results I want (e.g. 15:45 18:40)
I want to get the difference in time between these numbers.
Thank you

1545 1840
2015 2300
2045 2105
1700 1815
1825 1840
1850 2000
1835 1900

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert a column of positive numbers to negitive numbers JMason Excel Worksheet Functions 2 January 22nd 09 02:12 AM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
Convert numbers stored as text to numbers Excel 2000 Darlene Excel Discussion (Misc queries) 6 January 31st 06 08:04 PM
convert negative numbers to positive numbers and vice versa bill gras Excel Worksheet Functions 4 December 7th 05 01:39 AM
How to convert Excel imported numbers from text to numbers? Alden Excel Discussion (Misc queries) 9 April 1st 05 09:51 PM


All times are GMT +1. The time now is 03:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"