محاولة متواضعة ارجوا ان تكون مفيدة
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim lr As Long
lr = sheet1.Range("a10000").End(xlUp).Row
For i = 4 To lr
If sheet1.Cells(i, 2).Value < sheet1.Range("b3") Then
sheet1.Cells(i, 2).Interior.Color = vbRed
Else
sheet1.Cells(i, 2).Interior.Color = vbWhite
End If
Next
For i = 4 To lr
If sheet1.Cells(i, 3).Value < sheet1.Range("c3") Then
sheet1.Cells(i, 3).Interior.Color = vbRed
Else
sheet1.Cells(i, 3).Interior.Color = vbWhite
End If
Next
For i = 4 To lr
If sheet1.Cells(i, 4).Value < sheet1.Range("d3") Then
sheet1.Cells(i, 4).Interior.Color = vbRed
Else
sheet1.Cells(i, 4).Interior.Color = vbWhite
End If
Next
For i = 4 To lr
If sheet1.Cells(i, 5).Value < sheet1.Range("e3") Then
sheet1.Cells(i, 5).Interior.Color = vbRed
Else
sheet1.Cells(i, 5).Interior.Color = vbWhite
End If
Next
End Sub
درجات طلبه.xlsm