Tôi chỉ biết nếu chọn 1 cell thì cell đó không có màu, còn chọn > 1 cell. chưa biết.Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim iR As Long, iC As Long
iR = ActiveSheet.UsedRange.Rows.Count
iC = ActiveSheet.UsedRange.Columns.Count
If Target.Row > iR Or Target.Column > iC Then Cells.Interior.ColorIndex = xlNone
If Target.Row < iR + 1 And Target.Column < iC + 1 Then
Application.ScreenUpdating = False
Cells.Interior.ColorIndex = xlNone
i = Target.Row
With Range(Cells(i, 1), Cells(i, iC)).Interior
.ColorIndex = 41
.Pattern = xlSolid
End With
j = Target.Column
With Range(Cells(1, j), Cells(iR, j)).Interior
.ColorIndex = 43
.Pattern = xlSolid
End With
With Cells(i, j).Interior
.ColorIndex = xlNone
End With
Application.ScreenUpdating = True
End If
End Sub