使用宏对单元格的增删改查
Option Explicit
Public i As Integer
Public Function setupCellColor(s As Worksheet, i As Integer)
Dim c As Range
Dim j As Integer
Set c = s.Range("a1")
Do
If c.Value = "$PA-ET V1" Then
If c.Offset(, 1).Value = "$刻蚀检查" And c.Offset(1, 1).Value = "$铝后处理" Then
For j = 1 To 6
If c.Offset(0, j).Value <> c.Offset(1, j + 14).Value Then
c.Offset(1, j + 14).Interior.Color = vbRed
c.Offset(0, j).Interior.Color = vbRed
i = i + 1
Sheets("目录").Cells(i, 11).Value = s.Name
End If
Next
ElseIf c.Offset(, 1).Value = "$铝后处理" And c.Offset(-1, 1).Value = "$刻蚀检查" Then
For j = 1 To 6
If c.Offset(0, j)