LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Junior Member
 
Posts: 4
Default

Quote:
Originally Posted by Hokie_16 View Post
Put the if statement on column D instead of column E because that is what is really changing, right? Also, time is always a little funky in excel if you don't use it right. So put the following in each column

A:
=time(hour,minute,second) for your example this would would =time(8,0,0)

Then in B do the same thing:
=time(18,0,0)

Column C will be the same =B-C

Column D has your if statement that will look like this:
=IF(C1=TIME(12,0,0),TIME(1,0,0),TIME(0,30,0))

That is saying that if the shift is 12 hours or longer report back a break of 1 hour otherwise report back a 30 min break. Last is your total billable hours in column E:

=C-D

Does that anwer your question?
claus i cant start in a1 and b1 due to other information being in there, i will try your code a little later to edit the cells. and hokie_16 everytime i try i get the false command when trying =time(h,m,s). i forgot to tell you guys i use a list on another sheet, so i can do my drop down box to pick the times.

the code =IF(C1=TIME(12,0,0),TIME(1,0,0),TIME(0,30,0)) seems to be working fine, except boxes that are empty are displaying 00:30:00 instead of nothing.

also because of changing the formats to times instead of custom, before we used to work out the holiday as - holiday days allocated times 7.18 (1 day in a 36.5 hour week. but now i cant do that as im trying to get the sheet to do fully in time, for example old way was 31 days *7.18 = 222.58 hours worth of holiday. ive tried doing 7.18 (time) * 31 but i get back 10:18:00

stumped!

and thanks guys so far for your help
edit: hmmm think ive sorta found out whats going on in the total shift hours box but not sure how to fix it. basically because im using time, it will never go past 23:59:00. so if i did time addition for example 11:00:00 + 11:00:00 + 11:00:00 - instead of saying 33:00:00 to minus off my total holiday hours remaining it will say 09:00:00

added a picture
Attached Images
 

Last edited by lozzauk13 : April 27th 13 at 08:58 AM Reason: added picture
 
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
Time subtraction Dgwood90 Excel Worksheet Functions 3 December 20th 08 05:21 PM
subtraction off time after midnight Steved Excel Worksheet Functions 2 May 24th 06 01:46 AM
time subtraction problem Excel Worksheet Functions 6 July 15th 05 06:57 PM
subtraction with time format cells Stefano Excel Worksheet Functions 2 March 17th 05 03:06 PM
decimal time subtraction please. Steved Excel Worksheet Functions 6 November 25th 04 01:07 AM


All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"