View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
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