mak wrote:xraymitch
the code below clears the bet ref column (t) when the market turns in play
i don't know when your conditions are met or how but probably you or we could aadjust
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
If Cells(2, 5).Value = "In Play" Then
If Cells(1, 33).Value = "" Then
Cells(1, 33).Value = Now()
Range("T5:T55").Clear
End If
End If
If Cells(2, 5).Value = "Not In Play" Then
Cells(1, 33).Value = ""
End If
End If
End Sub
Sorry Mak I didn't notice your reply. I will play around with your sample code this evening.
I see you are using ".value" which might explain why my sheet was not working correctly. Here is my code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
For n = 5 To 34
If Cells(n, 22) > 0 And Cells(n, 22) < Cells(n, 27) And Cells(n, 31) <> 1 Then Cells(n, 17) = "CLEAR"
If Cells(n, 17) = "CLEAR" And Cells(n, 31) <> 1 Then Cells(n, 17) = "BACK"
If Cells(n, 17) = "BACK" Then Cells(n, 31) = 1
Next n
Application.EnableEvents = True
End Sub
Thanks for taking the time to post. You have been a great help
Ray
