View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
AussieGambler AussieGambler is offline
external usenet poster
 
Posts: 3
Default 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.