Help for Time tracker updation

I

Igneshwara reddy

Hi,

I have 9 members working on a project and require to track the timings for
all.

There are 6 columns in the spreadsheet.

column 1 contains the type of activity.
Column 2 contains the activity start time
Column 3 contains the activity end time.

I have to ensure the time is tracken completely without their intervention
in updating the timings.

When they select column 1 first row (type of activity) the Start time should
automatically update in Column 2 and when they select the column 1 again in
the second row the type of activity, the start time should update in column 2
second row and also the completion time in column 3 first row.

Example:
Column 1 Column 2 Column 3
Activity 1 05:38 06:37
Activity 2 06:37 08:45
Activity 3 08:45

This is how I am looking the tracker to be.

Please help me out in getting the tracker completely.

Regards,
Igneshwara Reddy.
 
J

Jacob Skaria

Dear Reddy

Assuming you have the headers in row1; the below code should work as per
your requirement.

Right click on the sheet tab>View Code>Paste the below code .Save and get
back to the worksheet and try out...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
If Trim(Target.Value) <> "" Then
If Target.Row > 2 Then Range("C" & Target.Row - 1) = Time()
Range("b" & Target.Row) = Time()
End If
End If
End Sub

If this post helps click Yes
 

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