Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calculating Difference Between Two Times in General Format

I am using a google document survey to have users enter times in a military
format. The result is pasted into excel as a "General" format number, like
2253 to represent 10:53PM. They do not enter the semicolon between hours and
minutes.

I need to see the number of minutes between two times, such as 2257 - 2253
or 4 minutes.

How can I convert general numbers, some of which are 04 to represent 00:04
AM, to serial times or time format?

Thanks very much in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Calculating Difference Between Two Times in General Format

Suppose
A1 = 2257 (formated as text)
B1 = 2253 (formated as text)

Try the below formula in C1 (formatted as hh:mm)

=TIME(INT(LEFT(A1,2)-LEFT(B1,2)),INT(RIGHT(A1,2)-RIGHT(B1,2)),0)

If this post helps click Yes
---------------
Jacob Skaria


"MGranger" wrote:

I am using a google document survey to have users enter times in a military
format. The result is pasted into excel as a "General" format number, like
2253 to represent 10:53PM. They do not enter the semicolon between hours and
minutes.

I need to see the number of minutes between two times, such as 2257 - 2253
or 4 minutes.

How can I convert general numbers, some of which are 04 to represent 00:04
AM, to serial times or time format?

Thanks very much in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default Calculating Difference Between Two Times in General Format

=TIME(LEFT(A9,2),MID(A9,3,2),0)

"MGranger" wrote:

I am using a google document survey to have users enter times in a military
format. The result is pasted into excel as a "General" format number, like
2253 to represent 10:53PM. They do not enter the semicolon between hours and
minutes.

I need to see the number of minutes between two times, such as 2257 - 2253
or 4 minutes.

How can I convert general numbers, some of which are 04 to represent 00:04
AM, to serial times or time format?

Thanks very much in advance.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Calculating Difference Between Two Times in General Format

=--TEXT(A2,"00\:00") and format as time.
--
David Biddulph

MGranger wrote:
I am using a google document survey to have users enter times in a
military format. The result is pasted into excel as a "General"
format number, like 2253 to represent 10:53PM. They do not enter the
semicolon between hours and minutes.

I need to see the number of minutes between two times, such as 2257 -
2253 or 4 minutes.

How can I convert general numbers, some of which are 04 to represent
00:04 AM, to serial times or time format?

Thanks very much in advance.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Calculating Difference Between Two Times in General Format

On Mon, 25 May 2009 04:25:01 -0700, MGranger
wrote:

I am using a google document survey to have users enter times in a military
format. The result is pasted into excel as a "General" format number, like
2253 to represent 10:53PM. They do not enter the semicolon between hours and
minutes.

I need to see the number of minutes between two times, such as 2257 - 2253
or 4 minutes.

How can I convert general numbers, some of which are 04 to represent 00:04
AM, to serial times or time format?

Thanks very much in advance.


And a numeric solution:

=(INT(A1/100)+MOD(A1,100)/60-
(INT(B1/100)+MOD(B1,100)/60))*60

And another method, if you have either Excel 2007+ or have installed the
Analysis Tool Pak:

=(DOLLARDE(A1/100,60)-DOLLARDE(B1/100,60))*60

--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Calculating Difference Between Two Times in General Format

I am using a google document survey to have users enter times in a
military
format. The result is pasted into excel as a "General" format number,
like
2253 to represent 10:53PM. They do not enter the semicolon between hours
and minutes.

I need to see the number of minutes between two times, such as 2257 -
2253
or 4 minutes.

How can I convert general numbers, some of which are 04 to represent
00:04
AM, to serial times or time format?

Thanks very much in advance.


And a numeric solution:

=(INT(A1/100)+MOD(A1,100)/60-
(INT(B1/100)+MOD(B1,100)/60))*60

And another method, if you have either Excel 2007+ or have installed the
Analysis Tool Pak:

=(DOLLARDE(A1/100,60)-DOLLARDE(B1/100,60))*60


Another method (making use of the formula David posted)...

=1440*(TEXT(A1,"00\:00")-TEXT(B1,"00\:00"))

--
Rick (MVP - Excel)

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
Calculate flying times using 24hour clock and 0000 general format Cobra2140 Excel Worksheet Functions 3 August 5th 08 07:57 PM
How calculate difference between [t]:mm-format and general format Lehmanns Excel Worksheet Functions 3 June 17th 08 06:24 PM
Calculating difference between times on 2 dates bollard Excel Worksheet Functions 4 June 10th 08 12:17 PM
Calculating the difference between 2 dates and times Dom Excel Discussion (Misc queries) 2 December 12th 07 04:56 PM
Calculating difference between two times Jaycatt Excel Worksheet Functions 2 August 8th 06 08:01 PM


All times are GMT +1. The time now is 02:23 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"