Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default How do i subtract a half hour from a time when 8 hrs.

I want a spread sheet that will calculate the hours and min between two times
and when the hours worked are greater than 8 i want to subtract a half hour.
I have =IF(((INT(B6-A6)*24)).*),(INT((B6-A6*24)-0.5),(INT((B6-A6*24)))
when B6 is the finish time and A6 is the start time
the formula i have now only shows me the hours worked and i need the exact
hours and min.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do i subtract a half hour from a time when 8 hrs.

I did a timesheet in excel several years back and found the formula got
very messy to display hours and minutes since the computer thinks in
decimal and minutes are sexidecimal. I ended up needing an extra cell
to break up the hours and minutes (multiplying the partial hour by 60
to convert it to minutes).

I doubt I still have the template anywhere but I'll take a look.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default How do i subtract a half hour from a time when 8 hrs.

If the start time is in A6 and the finish time is in B6:

=(B6-A6)-IF(B6-A61/3,1/48,0)

Format as [hh]:mm

Regards

Trevor


"lucy" wrote in message
...
I want a spread sheet that will calculate the hours and min between two
times
and when the hours worked are greater than 8 i want to subtract a half
hour.
I have =IF(((INT(B6-A6)*24)).*),(INT((B6-A6*24)-0.5),(INT((B6-A6*24)))
when B6 is the finish time and A6 is the start time
the formula i have now only shows me the hours worked and i need the exact
hours and min.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How do i subtract a half hour from a time when 8 hrs.

Keeping it as time your formula would be

=IF((B6-A6)TIME(8,0,0),B6-A6-TIME(0,30,0),B6-A6)

or I would use

=B6-A6-(B6-A6TIME(8,0,0))*TIME(0,30,0)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"lucy" wrote in message
...
I want a spread sheet that will calculate the hours and min between two

times
and when the hours worked are greater than 8 i want to subtract a half

hour.
I have =IF(((INT(B6-A6)*24)).*),(INT((B6-A6*24)-0.5),(INT((B6-A6*24)))
when B6 is the finish time and A6 is the start time
the formula i have now only shows me the hours worked and i need the exact
hours and min.



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
Convert time to Half Hour inverval BenS Excel Discussion (Misc queries) 4 May 20th 23 11:44 AM
How do I round time down to the nearest half hour? KatJ Excel Worksheet Functions 4 April 3rd 23 07:32 PM
Convert Time To Half Hour - Pt 2 - OOPS! BenS Excel Discussion (Misc queries) 4 March 29th 07 09:52 PM
Calculate time difference to the half hour Ken Ivins Excel Worksheet Functions 6 July 17th 05 05:48 PM
how do you subtract military time? example 12:00 - 07:00 = 5 hour. Bill Excel Worksheet Functions 1 October 27th 04 08:25 PM


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