Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Calculation Using Time

How do I calculate the difference between two times, and subtract 30 minutes
if the time exceeds 8 hours?
  #2   Report Post  
Posted to microsoft.public.excel.misc
gt gt is offline
external usenet poster
 
Posts: 19
Default Calculation Using Time

Hi Rodney:

With a formula or vba code?

cheers,
gt

"Rodney" wrote:

How do I calculate the difference between two times, and subtract 30 minutes
if the time exceeds 8 hours?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Calculation Using Time

Try this:

=MOD(B1-A1,1)*24-((MOD(B1-A1,1)*248)*30/1440*24)

Format as GENERAL or NUMBER

That'll return the the difference in decimal format: 8, 8.5, 10.75

--
Biff
Microsoft Excel MVP


"Rodney" wrote in message
...
How do I calculate the difference between two times, and subtract 30
minutes
if the time exceeds 8 hours?



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
Stop time - start time calculation squack21 Excel Worksheet Functions 5 December 10th 07 03:20 PM
Time calculation (Subraction of Idle Time) Ajay Excel Discussion (Misc queries) 6 March 4th 07 11:54 AM
Time calculation Jon Grant Excel Worksheet Functions 2 October 13th 06 12:11 PM
Ignoring Time in a Date Time Calculation nmp Excel Worksheet Functions 3 November 23rd 05 08:32 PM
time calculation with military time Ron Thetford Excel Worksheet Functions 8 July 29th 05 07:24 PM


All times are GMT +1. The time now is 07:40 AM.

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"