Dear All
I could not find a way to make the following formula to be executed through a loop OR other means in Excel 2007 VBA. There are 50 records and the records starts from row 9 till row 58 in the Sheet 20.
Any suggestions for the code would be highly appreciated.
Thanks.
Code
Private Sub CommandButton2_Click()
Sheet20.Range("GV9").Formula = "=IF(GQ9="""","""",IF(AND(DC9>=40,DW9>=40,EF9>=40,SMALL(GS9:GU9,2)>=35,LARGE(GS9:GU9,1)>=40,LARGE(GS9:GU9,1)>=35),""P"",""F""))"
Sheet20.Range("GV10").Formula = "=IF(GQ10="""","""",IF(AND(DC10>=40,DW10>=40,EF10>=40,SMALL(GS10:GU10,2)>=35,LARGE(GS10:GU10,1)>=40,LARGE(GS10:GU10,1)>=35),""P"",""F""))"
.
.
Sheet20.Range("GV58").Formula = "=IF(GQ58="""","""",IF(AND(DC58>=40,DW58>=40,EF58>=40,SMALL(GS10:GU10,2)>=35,LARGE(GS10:GU10,1)>=40,LARGE(GS10:GU10,1)>=35),""P"",""F""))"
End Sub
Display More