![]() |
Subtracting time in excel to show in minutes:seconds
Hi,
I'm using the following code for a timer(stopwatch)in excel, but the final time i want to show in mintues and seconds. Is there a way do this? Does anyone have something like this already they can share with me? What I want is to have a spreadsheet to show the time it took to perform a task, but I'm trying to put a stopwatch(timer) on so its all on one sheet. Please help! Thanks, Gabe Here's what I have for a timer(stopwatch): Option Explicit Private startTime As Single Private Sub StartButton_Click() startTime = Timer End Sub Private Sub StopButton_Click() Dim finalTime As Single finalTime = Timer - startTime ActiveCell = Format(finalTime, "0:00") End Sub |
Subtracting time in excel to show in minutes:seconds
hi,
the hours and minutes seems like a simple formate problem. the timer, don't know. see this site. it is all about time. http://www.mvps.org/dmcritchie/excel/datetime.htm -----Original Message----- Hi, I'm using the following code for a timer(stopwatch)in excel, but the final time i want to show in mintues and seconds. Is there a way do this? Does anyone have something like this already they can share with me? What I want is to have a spreadsheet to show the time it took to perform a task, but I'm trying to put a stopwatch(timer) on so its all on one sheet. Please help! Thanks, Gabe Here's what I have for a timer(stopwatch): Option Explicit Private startTime As Single Private Sub StartButton_Click() startTime = Timer End Sub Private Sub StopButton_Click() Dim finalTime As Single finalTime = Timer - startTime ActiveCell = Format(finalTime, "0:00") End Sub . |
All times are GMT +1. The time now is 12:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com