Hello,
the code is checking column 5 for changes but it look like you changed the structure and the column to check is 4 now, also the formulas will change then, try the following ans check formulas:
Sub Evaluate()
Application.ScreenUpdating = False
Dim i As Long, iSrt As Long
Dim clrSet&, clr1&, clr2&
clr1 = 0
clr2 = 20
clrSet = clr1
With Worksheets("Harvest Info")
iSrt = 2
For i = iSrt To .Cells(.Rows.Count, 1).End(xlUp).Row
If .Cells(i, 4).Value <> .Cells(i + 1, 4).Value Then
'formulas:
.Range(.Cells(i, 14), .Cells(i, 17)).Formula = Array("=SUM(M" & iSrt & ":M" & i & ")", _
"=IF(G" & i & "=0,"""",IF((O" & i & "/G" & i & ">=90%),"""",O" & i & "-(G" & i & "*0.9)))", _
"=IF(G" & i & "=0,"""",IF((O" & i & "/G" & i & ">100%), O" & i & "-G" & i & ",""""))", _
"=Count(M" & iSrt & ":M" & i & ")")
'backcolor:
.Range("A" & iSrt & ":Q" & i).Interior.ColorIndex = clrSet
If clrSet = clr1 Then clrSet = clr2 Else clrSet = clr1
iSrt = i + 1
End If
Next i
End With
Application.ScreenUpdating = True
End Sub
Bookmarks