你给出具体的行列来吧,方便编程
要不还得你自己改
看看是不是还得改区域之类的:
Sub main()
arr = Range("C2:Q4")
For i = 1 To UBound(arr)
Cells(i + 1, UBound(arr, 2) + 3) = 100
For j = 2 To UBound(arr, 2)
If Application.WorksheetFunction.Sum(Range(Cells(i + 1, j + 2), Cells(i + 1, j + 8))) = 0 Then
Range(Cells(i + 1, j + 2), Cells(i + 1, j + 8)).Interior.Color = vbYellow
End If
Next j
Cells(i + 1, UBound(arr, 2) + 3) = ""
Next i
End Sub