[COLOR="DarkSlateGray"][B]Private Sub Worksheet_Change(ByVal Target As Range)
Dim i%, ncol%, df$(1), dat As Range, x$
ncol = 10 [COLOR="Sienna"]'* Nb. de colonnes du tableau.[/COLOR]
Set dat = [F3:G3] [COLOR="Sienna"]'* [DEBUT:FIN][/COLOR]
If Not Intersect(Target, dat.Cells) Is Nothing Then
With Application: .Calculation = xlCalculationManual: .EnableEvents = False: .ScreenUpdating = False: End With
With [E6] [COLOR="Sienna"]'* Première cellule du tableau.[/COLOR]
On Error Resume Next
df(0) = dISO(normISO(UCase(dat(1).Value)))
df(1) = dISO(normISO(UCase(dat(2).Value)))
If Err.Number = 0 And df(1) >= df(0) Then
On Error GoTo 0
dat(1).Value = normTITINE(df(0)): dat(2).Value = normTITINE(df(1))
If Not IsEmpty(.Offset(1, 0)) Then
With Range(.Offset(1, 0), .End(xlDown))
.ClearContents
.Offset(1, 0).Resize(.Rows.Count + (.Rows.Count > 1), ncol).ClearFormats
End With
End If
Do
i = i + 1
x = dISO(Split(df(0), "W")(0) & "W" & Format(i + Split(df(0), "W")(1) - 1, "00"))
.Offset(i, 0).Value = normTITINE(x)
Loop Until x = df(1)
.Offset(1, 0).Resize(1, ncol).Copy
With Range(.Offset(1, 0), .End(xlDown))
[COLOR="Red"]On Error Resume Next
.Offset(1, 0).Resize(.Rows.Count - 1, ncol).PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
On Error GoTo 0[/COLOR]
End With
Target.Select
End If
End With
With Application: .ScreenUpdating = True: .EnableEvents = True: .Calculation = xlCalculationAutomatic: End With
End If
End Sub[/B][/COLOR]