Hi,
I've searched through 10 pages of macro looping on the forum in the hope of adapting one of the solutions to my problem.
Unfortunately, I have had no luck. My VBA skills are poorer than I thought and I'm thoroughly confused!
I'm trying to find a way for my macro to loop until either Yes or No appears in cell T6.
If anyone could offer a solution I'd be very grateful.
Thank you
I've searched through 10 pages of macro looping on the forum in the hope of adapting one of the solutions to my problem.
Unfortunately, I have had no luck. My VBA skills are poorer than I thought and I'm thoroughly confused!
I'm trying to find a way for my macro to loop until either Yes or No appears in cell T6.
If anyone could offer a solution I'd be very grateful.
Thank you
VBA Code:
Sub Com()
If Range("Q4") = "SIMULATION" Then
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Matches = Worksheets("Lists").Range("H36")
If Worksheets("Trades Log").Cells(Matches + 3, 14) > 0 Then
Matches = Matches + 1
End If
Worksheets("Lists").Range("H36") = Matches
Range("B5") = 0
Range("Q19:X41").ClearContents
Range("P19:P41") = False
Range("V8:W14").ClearContents
Range("V3:X5").ClearContents
Range("S8:t10").ClearContents
Range("S13:T15").ClearContents
Worksheets("Lists").Range("Q20") = Application.WorksheetFunction.RandBetween(1, 30000)
Worksheets("Lists").Range("S16") = 0
Worksheets("Lists").Range("S20") = 1
Range("Q6").Formula = "=((AA4+AA6+AA8)/3)/100"
Range("R6").Formula = "=AF4+AF6+AF8"
Range("S6").Formula = "=IF(((AB4+AC4+AB6+AC6+AB8+AC8)/6/100)>(((AA4+AA6+AA8)/3)/100),AC12,"""")"
Range("T6").Formula = "=IF(OR(AD4+AD6+AD8=3),""Yes"",IF(OR(AE4+AE6+AE8=3),""No"",""""))"
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Else
End If
End Sub