Sub SumBad()
Dim WK As Workbook
Dim WS As Worksheet
Dim Bad_Sum As Integer
Set WK = Excel.ActiveWorkbook
Set WS = WK.ActiveSheet
Bad_Sum = 0
' Перебор строк
For r = 2 To 7
' Перебор столбцов
For c = 6 To 8
If WS.Cells(r, c).Style = "Плохой" And IsNumeric(WS.Cells(r, c)) Then
Bad_Sum = Bad_Sum + WS.Cells(r, c)
End If
Next c
Next r
' Вывод результата
WS.Cells(9, 6) = Bad_Sum
End Sub