|
By:
vba
|
|
By:
How is it changing?
If the process that makes it change can also trigger a macro to check whether it has changed and updated the count, then great. But if something else is making it change then it is impossible to know if it changes very quickly or not. Like on Betfair in running on a race you soemtimes dont see all the rpcies as they change so fast and you can only press refresh so many time. Also what about if it hcnages jsut a very little bit, does not count as a change? I mean if you asked me if it was possible to count how many times the temperature changed in a room, then I would have to ask you what you defined as a change. If a small insect flies across the room creating a small air movement that migth cool the room. On the other hand if it burns energy flying then it might increase the temperature of the room. You need to tell me what sort of insect it is. |
|
By:
im sure its something very simple in vba like
---------------- onworkbookcellchange(a1) a2=a2+1 ---------------- obviously thats not the correct code (my vba is pretty rusty) but im sure that type of approach would work |
|
By:
If changing cell is row 5, column 5 then this will increment A1 every time the cell changes:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 5 And Target.Column = 5 Then Cells(1, 1) = Cells(1, 1) + 1 End If End Sub |
|
By:
something like this should work OK
Private Sub Worksheet_Change(ByVal Target As Range) Static Count As Variant Application.EnableEvents = False Application.Calculation = xlCalculationManual If [A1].Value = MyMarket Then GoTo Xit Else Count = [A1].Value [A2].Value = [A2].Value + 1 End If Xit: Application.EnableEvents = True Application.Calculation = xlCalculationAutomatic End Sub |
|
By:
Sorted thanks. :)
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address "$A$1" Then Exit Sub Range("$B$1") = Range("$B$1")+1 End Sub |
|
By:
how would it possible to edit the above code so that a change in A1 would count on B1, a change in A2 would count in B2 and A3 count in B3 ?
|
|
By:
For Loop
one of the above more familiar coders will amend it for you :) |
|
By:
Couldn't get your code to work on my version of excel but using imlac's code
Private Sub Worksheet_Change(ByVal Target As Range) For i = 1 To 3 If Target.Row = i And Target.Column = 1 Then Cells(i, 2) = Cells(i, 2) + 1 End If Next i End Sub |
|
By:
quick question re your formula posted @ 19.53 Ghetto Joe,
is it possible to display the five different values that where in a cell in a new column of data? Thanks |
|
By:
yes you can keep track of previous odds changes, I'm assuming your using gruss?
you just include stuff like For i = 5 To 35 Cells(i, 27) = Cells(i, 15) Next i within your code and that would copy the contents of F5:F40 (last price matched) into AA5:AA40 to log a trail of results For i = 5 To 35 Cells(i, 31) = Cells(i, 30) Cells(i, 30) = Cells(i, 29) Cells(i, 29) = Cells(i, 28) Cells(i, 28) = Cells(i, 27) Cells(i, 27) = Cells(i, 15) Next i you get the idea |
|
By:
yep cheers ghetto Joe, thanks for your time
|
|
By:
works a treat Ghetto Joe nice one ;)
|
|
By:
Wrong Hole Poker imlacs code will increase count if the same value is entered in the cell I just added a For loop to it t show how to include For
If you're entering data manually that'd be ok but if data is being entered automated and the same value i.e. 5 overwrites a 5 it will add one to the count. To avoid that you need to declare the variables as in Static Count As Variant etc and use things like If [A1].Value =Count Then so it wont increase the count if the cell value is the same as the previous value |
|
By:
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 1 To 3 If Target.Row = i And Target.Column = 1 Then Cells(i, 2) = Cells(i, 2) + 1 End If Next i End Sub The above code works fine when changing the cells manually, however if linked to gruss nothing happens. Any ideas? |
|
By:
Is there an easy way to see what profit I've made from one type of bet?
Can you arrange so you can see if you've done well by backing 0-0's for example? I've downloaded the history into excel but I'm not sure how to use it :( |
|
By:
http://excel.brainbell.com/
an excellent site that forum name Triggerster gave me yesterday, bookmark and look through it when you have time , great info |
|
By:
nice, thanks
|