Sub xx() m = ActiveSUsedRItem(ActiveSUsedRCount)Row n = ActiveSUsedRItem(ActiveSUsedRCount)Column For i = 12 To n If Cells(1, i) <> "" Then For j = 2 To 11 If Cells(1, j) = Cells(1, i) Then Exit For Next For k = 2 To m If Cells(k, i) <> "" And Cells(k, i) = Cells(k, j) Then Cells(k, i)IColorIndex = 3 Next End If NextEnd Sub