Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Stopwatch from Excel


I am trying to record the amount of time over the course of a day that
an excel formula is returning a given result e.g. "true" or "false"
My attempts at coding this in vb have proved very clunky, can anyone
think of a solution or know of a suitable programme that can be called
from excel?

TIA

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Stopwatch from Excel

A worksheet change function

Private Sub Worksheet_Change(ByVal Target As Range)

If StrComp(StrConv(Target, vbUpperCase), "TRUE") = 0 Then
Worksheets("sheet1").Range("A1") = Worksheets("sheet1").Range("A1") + 1
End If
If StrComp(StrConv(Target, vbUpperCase), "FALSE") = 0 Then
Worksheets("sheet1").Range("A2") = Worksheets("sheet1").Range("A2") + 1
End If
End Sub


"DTM" wrote:


I am trying to record the amount of time over the course of a day that
an excel formula is returning a given result e.g. "true" or "false"
My attempts at coding this in vb have proved very clunky, can anyone
think of a solution or know of a suitable programme that can be called
from excel?

TIA


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Stopwatch from Excel

You can simplify

If StrComp(StrConv(Target, vbUpperCase), "TRUE") = 0 Then

to

If Target.Value Then

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Joel" wrote in message
...
A worksheet change function

Private Sub Worksheet_Change(ByVal Target As Range)

If StrComp(StrConv(Target, vbUpperCase), "TRUE") = 0 Then
Worksheets("sheet1").Range("A1") = Worksheets("sheet1").Range("A1") +
1
End If
If StrComp(StrConv(Target, vbUpperCase), "FALSE") = 0 Then
Worksheets("sheet1").Range("A2") = Worksheets("sheet1").Range("A2") +
1
End If
End Sub


"DTM" wrote:


I am trying to record the amount of time over the course of a day that
an excel formula is returning a given result e.g. "true" or "false"
My attempts at coding this in vb have proved very clunky, can anyone
think of a solution or know of a suitable programme that can be called
from excel?

TIA




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel StopWatch [email protected] Excel Programming 4 August 11th 14 03:43 AM
Starting a stopwatch on Excel???!?!?! Paul23 Excel Discussion (Misc queries) 2 June 10th 10 09:20 PM
Is it possible to place a stopwatch in Excel Kari Excel Worksheet Functions 2 June 10th 10 09:16 PM
Is there a way to have a timer or stopwatch function in Excel. JSenew Excel Worksheet Functions 3 October 23rd 07 08:36 PM
How do I set up stopwatch racing times in Excel? Armand Excel Worksheet Functions 1 May 8th 06 01:51 AM


All times are GMT +1. The time now is 01:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"