Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Is there a way to have a timer or stopwatch function in Excel.
|
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Is there a way to have a timer or stopwatch function in Excel.
Tell us what you want to do. HTH Otto
"JSenew" wrote in message ... |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Is there a way to have a timer or stopwatch function in Excel.
Wishing to help a friend of mine that runs mtn. bike races. He does in
manually, I was wondering if I could use Excel. The dream would be I 'start' the timer, then as a racer crosses the finish line, I type in their bib number and hit enter. Time is recorded for that bib number. When the next racer finishes, I type in that bib number and hit enter. That time is recorded for that bib number. Thanks in advance for you help. "Otto Moehrbach" wrote: Tell us what you want to do. HTH Otto "JSenew" wrote in message ... |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Is there a way to have a timer or stopwatch function in Excel.
Here's some great code for a precise timer.
Private Declare Function getFrequency Lib "kernel32" Alias _ "QueryPerformanceFrequency" (cyFrequency As Currency) As Long Private Declare Function getTickCount Lib "kernel32" Alias _ "QueryPerformanceCounter" (cyTickCount As Currency) As Long Public dblStart As Double Public dblEnd As Double Function MicroTimer() As Double ' COPYRIGHT © DECISION MODELS LIMITED 2000. All rights reserved ' returns a Double containing seconds ' uses Windows API calls to the high resolution timer Dim cyTicks1 As Currency Static cyFrequency As Currency MicroTimer = 0 ' get frequency If cyFrequency = 0 Then getFrequency cyFrequency ' get ticks getTickCount cyTicks1 ' calc seconds If cyFrequency Then MicroTimer = cyTicks1 / cyFrequency End Function ----------------- In your code declare a couple of vars that are doubles Public dblStart As Double Public dblEnd As Double 'record the start time dblStart = MicroTimer() ' do some stuff here ' record the end time dblEnd = MicroTimer() ' calc the elapsed time & put in the range named "Elapsed" Range("elapsed) = dblEnd - dblStart "Otto Moehrbach" wrote: Tell us what you want to do. HTH Otto "JSenew" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Starting a stopwatch on Excel???!?!?! | Excel Discussion (Misc queries) | |||
Is it possible to place a stopwatch in Excel | Excel Worksheet Functions | |||
template timer stopwatch | Excel Worksheet Functions | |||
Stopping a Timer / Running a timer simultaneously on Excel | Excel Discussion (Misc queries) | |||
Timer function needs improvement | Excel Worksheet Functions |