Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
how do i find the last time i picked a winner
i keep a record of my horse selections and there placing. How do I find the
last time I won as a count. EG. column is 1 10 3 4 7 hence won 5 bets ago. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how do i find the last time i picked a winner
You could right click the sheet tab, view code and paste this in. As you add
your results to column A then B1 will show your last winnner Private Sub Worksheet_Change(ByVal Target As Range) Count = 1 If Not Intersect(Target, Range("A1:A100")) Is Nothing Then' change to suit lastrow = Range("A65536").End(xlUp).Row For x = lastrow To 1 Step -1 If Cells(x, 1).Value < 1 Then Count = Count + 1 Else Application.EnableEvents = False Cells(1, 2).Value = "Your last winner was " & Count & " races ago" Application.EnableEvents = True Exit Sub End If Next End If End Sub Mike "AussieGambler" wrote: i keep a record of my horse selections and there placing. How do I find the last time I won as a count. EG. column is 1 10 3 4 7 hence won 5 bets ago. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
how do i find the last time i picked a winner
Thanks mate it worked great. With 20 systems being followed it is a great
time saver. "AussieGambler" wrote: i keep a record of my horse selections and there placing. How do I find the last time I won as a count. EG. column is 1 10 3 4 7 hence won 5 bets ago. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
how do i find the last time i picked a winner
Thanks it was of great use and I have other uses for it. TY
"Mike H" wrote: You could right click the sheet tab, view code and paste this in. As you add your results to column A then B1 will show your last winnner Private Sub Worksheet_Change(ByVal Target As Range) Count = 1 If Not Intersect(Target, Range("A1:A100")) Is Nothing Then' change to suit lastrow = Range("A65536").End(xlUp).Row For x = lastrow To 1 Step -1 If Cells(x, 1).Value < 1 Then Count = Count + 1 Else Application.EnableEvents = False Cells(1, 2).Value = "Your last winner was " & Count & " races ago" Application.EnableEvents = True Exit Sub End If Next End If End Sub Mike "AussieGambler" wrote: i keep a record of my horse selections and there placing. How do I find the last time I won as a count. EG. column is 1 10 3 4 7 hence won 5 bets ago. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Displaying winner/first four placings. | Excel Worksheet Functions | |||
Formula to display the winner | Excel Worksheet Functions | |||
Can Excel randomly pick one winner out of 100 contest entries? | Excel Discussion (Misc queries) | |||
Posts not getting picked up | Excel Discussion (Misc queries) | |||
If certain item is picked, then text added... | Excel Discussion (Misc queries) |