Elapsed times corresponding to cell values

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Elapsed times corresponding to cell values

Postby wynhowe » Mon Jan 09, 2012 6:13 pm

Hi All,
I have been struggling with this for a while now and was wondering if anybody had any suggestions on how to go about it.
I need a method of getting elapsed times assigned to cell values. To explain further- if, say cell AK5 has either a value of 1 or -1 then when it =1, seconds counter starts in cell AL5, or AM5 for -1.The cell(AK5) will change many times during the event so the counters would have to retain previous seconds and just add on further seconds whenever the change occurred. I have limited understanding of Excel and VBA in particular so don't know if this is easy or complex. AK5 will always be at 1 or -1 but going to a new market they (cells AL5 and AM5) would have to revert to zero. AL5 and AM5 will always increment by 1 for every second depending on value in AK5.Also it would have to cater to all rows i.e. AK5,AK6,AK7,---------AK40.Basically a stop watch that doesn’t revert to zero until market change.
Many Thanks
wynhowe
 
Posts: 3
Joined: Mon Jan 09, 2012 12:59 pm
Location: Surrey,UK

Postby alrodopial » Mon Jan 09, 2012 8:47 pm

vba is needed
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby wynhowe » Tue Jan 10, 2012 2:33 pm

I am aware that VBA is needed but how do you (for instance) stop a simple counter reverting to zero when the value in AK5 changes from 1 to -1 or -1 to 1?
wynhowe
 
Posts: 3
Joined: Mon Jan 09, 2012 12:59 pm
Location: Surrey,UK

Postby Captain Sensible » Thu Jan 12, 2012 3:10 pm

You just need to take a timestamp when a certain event occurs then compare that timestamp against the current time to get the difference. Here's a simple routine I use in an automated sheet that gets the in running seconds then resets once the market is suspended so it's ready for the next market.

If Cells(2, 5) = "In Play" Then
If Cells(1, 24) = "" Then Cells(1, 24) = Cells(2, 3)
If Cells(1, 24) <> "" Then Cells(2, 24) = DateDiff("s", Cells(1, 24), Cells(2, 3))
End If
If Cells(2, 5) <> "In Play" And Cells(2, 6) <> "Suspended" Then
Cells(1, 24) = ""
Cells(2, 24) = ""
End If
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Thu Jan 12, 2012 3:20 pm

wynhowe wrote:I am aware that VBA is needed but how do you (for instance) stop a simple counter reverting to zero when the value in AK5 changes from 1 to -1 or -1 to 1?


You'd just use the timestamp cell to control any further changes, so the timestamp would be set from nothing to a time value once your condition in AK5 was met. The counter has it's own set of rules to only start counting once the timestamp value is no longer nothing "" so isn't reliant on AK5
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby wynhowe » Thu Jan 12, 2012 3:54 pm

Thanks C.S. for the info. I'll try to implement the above and see how I get on. Much appreciated.
wynhowe
 
Posts: 3
Joined: Mon Jan 09, 2012 12:59 pm
Location: Surrey,UK


Return to Discussion

Who is online

Users browsing this forum: No registered users and 49 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.