Track lap times with Excel



Track lap times with Excel. Track both the time for each lap and the total time.
Check out my online courses www.easyexcelanswers.com/courses.html
All my courses include online support and a user manual
Let me teach you the VBA that I have learn in my five years of consulting

Let’s take the frustration out of user forms

Become an Affiliate and earn 25% on Course Sales

For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.

Contact me regarding customizing this template for your needs.

Click for online Excel Consulting

I am able to provide online help on your computer at a reasonable rate.

I use a Blue condenser Microphone to record my videos, here is the link

Check out Crowdcast for creating your webinars

If you need to buy Office 2019 follow

I use Tube Buddy to help promote my videos
Check them out

Follow me on Facebook

TWEET THIS VIDEO

Follow me on twitter
easyexcelanswers

IG @barbhendersonconsulting

You can help and generate a translation to you own language

*this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I’ve used or have experience with.

Templates with code available for $50 USD

code
code for sheet
Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Me.Range(“A2”)) Is Nothing Then

Call laps
Application.EnableEvents = True
End If

End Sub

Code for laps
Sub laps()
Dim barcode As String
Dim rng As Range
Dim Total As Double
Dim Timest As Date
Dim Timeed As Date
Dim rownumber, c As Long

barcode = ActiveSheet.Cells(2, 1)
If barcode (does not equal) “” Then
Set rng = ActiveSheet.Range(“a4:a150”).Find(What:=barcode, _
LookIn:=xlFormulas, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If rng Is Nothing Then
ActiveSheet.Range(“a4:a1005”).Find(“”).Select
ActiveCell.Value = barcode
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Date & ” ” & Time
ActiveCell.NumberFormat = “m/d/yyyy h:mm:ss AM/PM”
ActiveSheet.Cells(2, 1) = “”
Else
rownumber = rng.Row

ActiveSheet.Range(Cells(rownumber, 2), Cells(rownumber, 13)).Find(“”).Select
ActiveCell = Date & ” ” & Time
ActiveCell.NumberFormat = “m/d/yyyy h:mm:ss AM/PM”
ActiveCell.Offset(0, 1).Select
c = ActiveCell.Column
Select Case c
Case Is = 4
Timest = CDate(ActiveCell.Offset(0, -2).Value)
Case Is = 6
Timest = CDate(ActiveCell.Offset(0, -3).Value)
Case Is = 8
Timest = CDate(ActiveCell.Offset(0, -3).Value)
Case Is = 10
Timest = CDate(ActiveCell.Offset(0, -3).Value)
Case Is = 12
Timest = CDate(ActiveCell.Offset(0, -3).Value)
Case Is = 14
Timest = CDate(ActiveCell.Offset(0, -3).Value)
End Select

Timeed = CDate(ActiveCell.Offset(0, -1).Value)
Total = TimeValue(Timeed) – TimeValue(Timest)
Debug.Print Total
Debug.Print Format(Total, “hh:mm:ss”)
ActiveCell.NumberFormat = “hh:mm:ss”
ActiveCell.Value = Total

ende:
ActiveSheet.Cells(2, 1) = “”
End If
End If
ActiveSheet.Cells(2, 1).Select
End Sub

Watch more new videos about Excel Office | Synthesized by Mindovermetal English

Rate this post

Bài viết liên quan

Theo dõi
Thông báo của
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận