High/Low Balance

Please post any questions regarding the program here.

Moderator: 2020vision

High/Low Balance

Postby Steve Voltage » Sun Aug 02, 2009 4:37 pm

Anyone know of a way to get the highest and lowest balance using excel ? A condition would be that your exposure = 0. The reason for this would be that i could set my stake to change when my balance reached a new high or low.


I thought i had cracked it with the following code but all this does is record the new high/low balance in column Z even if the exposure does not = 0 for some reason.

Private Sub Worksheet_Calculate()
Dim LR As Long
LR = Me.Range("Z" & Rows.Count).End(xlUp).Row
If Range("AL2").Value = 0 Then

If Range("AI2").Value > Range("Z" & LR).Value Then Range("Z" & LR + 1).Value = Range("AI2").Value
End If
If Range("AI2").Value < Range("Z" & LR).Value Then Range("Z" & LR + 1).Value = Range("AI2").Value
End Sub

Any help please.
:wink:
Steve Voltage
 

Postby osknows » Sun Aug 02, 2009 6:44 pm

You need to move the End if statement down a few lines to ensure it doesn't fire exposure = 0

Code: Select all
Private Sub Worksheet_Calculate()
Dim LR As Long
LR = Me.Range("a" & Rows.Count).End(xlUp).Row
If Range("e1").Value = 0 Then

If Range("d1").Value > Range("a" & LR).Value Then Range("a" & LR + 1).Value = Range("d1").Value

If Range("d1").Value < Range("a" & LR).Value Then Range("a" & LR + 1).Value = Range("d1").Value

End If
End Sub


An easier alternative you may want to consider:
Set J2 trigger to U to update the balance and exposure in cells I2 & L2 after each refresh then using normal excel formula

Starting bank = A fixed amount you must update when you start BA (usually equal to your current balance)
Current bank = Current balance - Current exposure (CE is negative)
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 34 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.