@JIDE
C'est moi qui l'ai ton peigne
@James007
merci pour ta réponse...mais je n'arrive pas à la faire marcher
Comme j'ai déjà du code qui commence par
Private Sub Worksheet_Change(ByVal Target As Range)
j'ai l'impression qu'il y a des interférences incontrôlables, et je suis obligé de planter Excel pour que ça cesse.
Comme à la base, c'est un souci d'esthète, je crois que je vais arrêter les frais.
Mais comme tu as l'air du genre opiniâtre, je colle quand même le code (mais si tu n'as pas le courage de comprendre ce qui merde, tu peux vraiment laisser tomber)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = True
If IsDate(Target) Then Target.Formula = "=UPPER(TEXT(" & CLng(Target.Value) & ",""ddd""))"
Application.EnableEvents = True
Application.EnableEvents = False
[A9] = Range("H" & Rows.Count).End(xlUp).Row - 16 - Range("AFR_nb_cell_spectacles")
Application.EnableEvents = True
If Flag = True Or Target.Count > 1 Then Exit Sub
If Not Application.Intersect(Target, [AFR_col_urgences]) Is Nothing Then
If Abs(Target) > 5 Then
OldTgt = Abs(Target)
Flag = True
Application.ScreenUpdating = False
For Each Cel In [AFR_col_urgences]
If Cel.Offset(0, 2) = Target.Offset(0, 2) And Abs(Cel) < 7 Then Cel.Value = Cel / OldTgt * 5
Next
End If
End If
Flag = False
If Target.Column = 9 Then
With Target
Select Case Len(.Value) - Len(Replace(.Value, Chr(10), ""))
Case 1
.Font.Size = 7
Case 2
.Font.Size = 6
Case 3
.Font.Size = 5
Case 4
.Font.Size = 5
Case 5
.Font.Size = 5
Case 4
.Font.Size = 5
Case 3
.Font.Size = 5
Case 2
.Font.Size = 6
Case 1
.Font.Size = 7
End Select
End With
End If
End Sub
Merci en tous cas