Salut Gilles,
Salut Galopin,
si j'ai bien compris...
- tri comme tu le souhaites : NOM + Prénom ;
With Worksheets("adhérents 2019-2020")
sCol = Split(Columns(.Cells(3, .Columns.Count).End(xlToLeft).Column).Address(ColumnAbsolute:=False), ":")(1)
.Range("A4:" & sCol & .Range("C" & Rows.Count).End(xlUp).Row).Sort key1:=.Range("C4"), order1:=xlAscending, key2:=.Range("D4"), order2:=xlAscending
.Range("C4").Select
End With
- après recherche de nom et filtre, un clic en [A1] ShowAllData ;
If Not Intersect(Target, [A1]) Is Nothing And ActiveSheet.FilterMode = True Then ActiveSheet.ShowAllData
- quand tu ajoutes un nouveau membre, création des formules en [A:B] ;
If Not Intersect(Target, Range("C:D")) Is Nothing Then
If Cells(iRow, 1).HasFormula = False Then
Cells(iRow, 1).FormulaLocal = "=SI(B" & iRow & "<>"""";""X"";"""")"
Cells(iRow, 2).FormulaLocal = "=SI(NBVAL(E" & iRow & ":L" & iRow & ")<>0;NBVAL(E" & iRow & ":L" & iRow & ");"""")"
Range("A" & iRow & "B:" & iRow).Interior.Color = [A3].Interior.Color
End If
End If
Et si ce n'est pas ça qu'il fallait, et bien, tant pis, je me serai quand même bien amusé quelques minutes!
A+