Time Sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking for an Excel time sheet that has the following features.
Description, Start Time, End Time, Time Taken, Cost.
The most important part of this time sheet is the ability to automatically
register a start time (by clicking on a cell to automatically fill in the
current time) as well as a stop time.
If one already exixts - great. If not I will have to design from scratch.
Any thoughts on its implemention?
 
Use a Worksheet_SelectionChange event macro in the sheet module to enter the
times. Something like:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Intersect(Target, Columns("C:D")) Is Nothing Then Exit Sub
Target.Value2 = Time
End Sub

Be aware however that if, after writing the macro, you highlight columns C&
D, (to format then say), you will enter the current time into *every* cell.

To calculate the time take use:

=D4-C4

or if the times may cross midnight use:

=MOD(D4-C4,1)

or:

=D4-C4+(D4<C4)

and if time taken was in E4 the rate is in say cell F1, the cost will be:

=E4*24*$F$1

formatted as curreny


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Thanks for that. I will give this a try.
--
Thanks again
Jack


Sandy Mann said:
Use a Worksheet_SelectionChange event macro in the sheet module to enter the
times. Something like:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Intersect(Target, Columns("C:D")) Is Nothing Then Exit Sub
Target.Value2 = Time
End Sub

Be aware however that if, after writing the macro, you highlight columns C&
D, (to format then say), you will enter the current time into *every* cell.

To calculate the time take use:

=D4-C4

or if the times may cross midnight use:

=MOD(D4-C4,1)

or:

=D4-C4+(D4<C4)

and if time taken was in E4 the rate is in say cell F1, the cost will be:

=E4*24*$F$1

formatted as curreny


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Back
Top