Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For M = 4 To 9
If Sheet1.Cells(M, 6).Font.ColorIndex = 3 Or Sheet1.Cells(M, 8).Font.ColorIndex = 3 Or Sheet1.Cells(M, 10).Font.ColorIndex = 3 Or Sheet1.Cells(M, 12).Font.ColorIndex = 3 Then
Sheet1.Cells(M, 14) = "不合格"
Else
Sheet1.Cells(M, 14) = "合格"
End If
Next
End Sub作者: rouber590324 時間: 2015-2-9 11:07
+不合格自動秀紅色
Sub AA()
For M = 4 To 9
If Sheet1.Cells(M, 6).Font.ColorIndex = 3 Or Sheet1.Cells(M, 8).Font.ColorIndex = 3 Or Sheet1.Cells(M, 10).Font.ColorIndex = 3 Or Sheet1.Cells(M, 12).Font.ColorIndex = 3 Then
Sheet1.Cells(M, 14) = "不合格"
Sheet1.Cells(M, 14).Font.ColorIndex = 3
Else
Sheet1.Cells(M, 14) = "合格"
End If
Next
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For M = 4 To 9
If Sheet1.Cells(M, 6).Font.ColorIndex = 3 Or Sheet1.Cells(M, 8).Font.ColorIndex = 3 Or Sheet1.Cells(M, 10).Font.ColorIndex = 3 Or Sheet1.Cells(M, 12).Font.ColorIndex = 3 Then
Sheet1.Cells(M, 14) = "不合格"
Sheet1.Cells(M, 14).Font.ColorIndex = 3
Else
Sheet1.Cells(M, 14) = "合格"
Sheet1.Cells(M, 14).Font.ColorIndex = 1
End If
Next
End Sub作者: qq78787 時間: 2015-2-9 13:43
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For M = 4 To 9
If 工作表1.Cells(M, 6).Font.ColorIndex = 3 Or 工作表1.Cells(M, 8).Font.ColorIndex = 3 Or 工作表1.Cells(M, 10).Font.ColorIndex = 3 Or 工作表1.Cells(M, 12).Font.ColorIndex = 3 Then
工作表1.Cells(M, 14) = "不合格"
工作表1.Cells(M, 14).Font.ColorIndex = 3
Else
工作表1.Cells(M, 14) = "合格"
工作表1.Cells(M, 14).Font.ColorIndex = 1
End If
Next
End Sub作者: qq78787 時間: 2015-2-9 16:04