PC Review


Reply
Thread Tools Rate Thread

Calculation Using Time

 
 
Rodney
Guest
Posts: n/a
 
      17th Jun 2008
How do I calculate the difference between two times, and subtract 30 minutes
if the time exceeds 8 hours?
 
Reply With Quote
 
 
 
 
gt
Guest
Posts: n/a
 
      17th Jun 2008
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?

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      17th Jun 2008
Try this:

=MOD(B1-A1,1)*24-((MOD(B1-A1,1)*24>8)*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" <(E-Mail Removed)> wrote in message
news:EBA0B1A7-6A3D-4546-9D96-(E-Mail Removed)...
> How do I calculate the difference between two times, and subtract 30
> minutes
> if the time exceeds 8 hours?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Working Time calculation - from text to short time Nancy Tang Microsoft Access 2 7th May 2010 11:27 AM
Stop time - start time calculation squack21 Microsoft Excel Worksheet Functions 5 10th Dec 2007 03:20 PM
Time calculation (Subraction of Idle Time) =?Utf-8?B?QWpheQ==?= Microsoft Excel Misc 6 4th Mar 2007 11:54 AM
Ignoring Time in a Date Time Calculation =?Utf-8?B?bm1w?= Microsoft Excel Worksheet Functions 3 23rd Nov 2005 08:32 PM
Repost - Time Calculation After Date and Time. =?Utf-8?B?UnVzcw==?= Microsoft Excel Worksheet Functions 0 30th Mar 2004 12:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:49 PM.