I tried multiples things and I'm still not able to resolve my problem.
What could I add to the code in order to not be able to Target a same value in Range("A5:G11") twice, and only be able to Target a maximum of 6 values in Range("A5:G11") at the time?
Here is what I have up to now.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim valeur As Range, c As Range, KeyRange As Range
If Target.Cells.Count > 1 Then
Exit Sub
ElseIf Not (Intersect(Target, Range("A5:G11")) Is Nothing) Then
Target.Interior.ColorIndex = 3
Else
Exit Sub
End If
Set valeur = Range("C14:C19")
For Each c In valeur.Cells
If c.value = "" Then
c.value = Target.value
Exit Sub
End If
Next c
On Error Resume Next
Set KeyRange = Range("C14")
valeur.Sort Key1:=KeyRange, Order1:=xlAscending
End Sub