Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,259
- Office Version
- 2010
- Platform
- Windows
Hi good afternoon, hope you can help me please, i have a userform with textbox1 is the Time, Textbox2 is the miles ran and textbox3 will be the pace, in CommandButton1 this is the button to work out the calculation for the pace, i have put in the formula below but it does not work when i put in decimal points in on the time or miles for example, so if i did 5 miles in 10 minutes then it works but if i put 3.11 miles in 27:32 i get an error. Please help, do i need to change the value in textbox1 (time)_ to HH:MM? if so how do i do this? please advise
EDIT:
i think i need to do this as well but unsure how Time is in hours : minutes : seconds, Distance is in miles, and Pace is in minutes/mile matching the unit Distance is in.
Pace ≠ Speed
Pace is minutes per 1 unit of distance, while Speed is distance per time unit.
Though they are not equal you can convert between them using the distance form of the top formula:
Problem: How fast is a 8:30 pace
Known: Pace = 8.5 minutes for 1 mile
Time = 1 hour or 60 minutes
Needed: Distance = Time / Pace
Calculations: Distance = 60 minutes/8.5 minutes
= 7.06 miles / hour
So, an 8:30 pace = 7.06 miles/hour speed
VBA Code:
Private Sub CommandButton1_Click()
TextBox3.Value = (TextBox1.Value / TextBox2.Value)
End Sub
EDIT:
i think i need to do this as well but unsure how Time is in hours : minutes : seconds, Distance is in miles, and Pace is in minutes/mile matching the unit Distance is in.
Pace ≠ Speed
Pace is minutes per 1 unit of distance, while Speed is distance per time unit.
Though they are not equal you can convert between them using the distance form of the top formula:
Problem: How fast is a 8:30 pace
Known: Pace = 8.5 minutes for 1 mile
Time = 1 hour or 60 minutes
Needed: Distance = Time / Pace
Calculations: Distance = 60 minutes/8.5 minutes
= 7.06 miles / hour
So, an 8:30 pace = 7.06 miles/hour speed
Last edited by a moderator: