This can't be that difficult but I'm not having luck sofar..

N

niels007

Hey all,

Just stumbled across this forum, lets hope its going to help :)


At work we use a simple Excel sheet to enter the hours each employe
works each day. Half an hour has to be subtracted if the day total i
greater than 5 hours (unpaid lunch break) for example:

Monday 12:00 to 18:30 = 6:00 (half an hour unpaid)
Tuesday 15:00 to 18:30 = 3:30 (no unpaid break)

The reason is simple.. now it doesnt really take part timers int
account and simply subtracts half an hour each day, so I'm findin
myself not paid for a few hours a month! Better get that excel shee
working properly! :) I also want to add extra hours, coupled to m
hourly wage so I know what exactly should be on the pay cheque eac
month, but thats something for lateron..

Using numbers this is what i've done sofar...

cell A1=4 cell A2=10

=IF(A2-A1>5;A2-A1-0,5)

this succesfully subtracts 0.5 if more than 5 hours are worked.. bu
now I have 2 problems.
1) adding what it should do if I work LESS than 5 hours .. simply get
'not true' now..
2) somehow with cell properties set to 'time' even the basic 'formula
as seen above doesn't seem to work. How should i work with the 'time
cell property?

Bit of an Excel noob, sorry for that.. Can anyone help me out here?

Thanks,

Niel
 
B

Bob Phillips

Niels,

If the cells are not set to time, just use

=(A2-A1)-((A2-A1)>5)*0.5

If set to time, then use

=(A2-A1)-((A2-A1)>5/24)*0.5/24
and make sure the result cell is formatted as time

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
N

niels007

Thanks, I got the basic sheet working properly now! Some more daunting
things to do for my 'own' sheet tomorrow, but this is a great start.

Niels
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top