Is there formula I can put in excell to to clock in clock out time for payroll? In 8:12 out 17:47 -.45 lunch =

Hi, This simple macro will put the current time into the active cell

Sub Time_Now() 'Routine to Enter current time in active cell 'Change format as required With ActiveCell .Value = Time .NumberFormat = "hh:mm" End With End SubPut the macro in a standard module in the Personal.xls workbook

The easiest way to use this is to put a button on a toolbar and link it to this macro. When you have selected a cell, clicking the button will put the time in the cell.

A better way is to add an insert time option to the right click cell shortcut menu, but this is a little more complicated.

Note that this macro only puts the time in the cell.

If you need date as well it can easily be modified.

The time format is 24hrs e.g., 16:10

but it can be changed in the format line in the macro.To calculate hours, if start time is in A2 and finish time in B2

In C2 put =B2-A2You can add the break duration

Enter it in D2 as 0:45

The formulas in C2 and E2 are also shownA B C D E 1 Start Finish Total Break Worked 2 8:00 17:47 9:47 0:45 9:02 =B2-A2 =C2-D2This calculation will not work if finish time is after midnight, but there are ways of dealing with that, if it is an issue.

Just ask.

Regards

Here are a couple of sites that you might find of inertest: http://www.cpearson.com/excel/overt...

http://www.bettersolutions.com/exce...MIKE

hi,

sorry for bumping and stealing this topic,

but I think my question is related to this topic and since I'm newcomer here please forgive me ;)the problem :

I am developing a time tracking s/w for a time clock system and problem starts when the employees start their work suppose at 10pm and their job will finish at 3am next day

this time zone spread into two different days.

like he starts his job at Monday 10pm and he will finish it at Tuesday 3am.I am not able to calculate this time period correctly .

I need some ideas about this problem or any existed algorithm according to that will be welcomed.

and what is the other companie's solution as regards of this problem?

how do u they solve it?

regards.

Hi, Can I ask that you start a new thread.

It makes it easier to track topics.

Use a title that describes the issue such as Excel time calculation after midnight.

In the body of the question be as specific as you can be about what you need to do. What inputs you have and what outputs you need

In the meantime look at Response #1 in

this thread.Regards

Ask Your Question

Weekly Poll

Do you think Microsoft should invest in Cyanogen?

Discuss in The Lounge

Poll History