Sub Creation_feuille()
Dim i%, nom$, prenom$, nf$, sAdress, ws As Worksheet
Application.ScreenUpdating = False
With ActiveSheet
For i = 3 To .[B1] + 2
nom = .Cells(i, 2)
prenom = .Cells(i, 3)
nf = nom & "_" & Left(prenom, 1)
Set ws = Nothing
On Error Resume Next
Set ws = Sheets(nf)
On Error GoTo 0
If ws Is Nothing Then
Sheets("MODELE").Copy After:=Sheets(Sheets.Count)
With ActiveSheet
.Name = nf
.Cells(1, 2) = nom
.Cells(2, 2) = prenom
End With
sAdress = nf & "!A1"
.Hyperlinks.Add Anchor:=.Cells(i, 1), Address:="", SubAddress:=sAdress
.Cells(i, 4).Formula = "=IF(" & nf & "!A5="""",""""," & nf & "!A5)"
.Cells(i, 5).Formula = "=IF(" & nf & "!B5="""",""""," & nf & "!B5)"
End If
Next
.Activate
End With
End Sub