Bonjour un tous
je cherche un code vba pour numéroter les lignes de mon tableau à partir de la colonne B2
j'ai mis ci-joint le résultat que je souhaite avoir
Option Explicit
Sub Numeroter()
Dim i As Integer
Application.ScreenUpdating = False
With Sheets("Feuil1")
i = 2
Do While .Cells(i, 1) <> ""
.Cells(i, 2) = i - 1
i = i + 1
Loop
End With
Application.ScreenUpdating = True
End Sub
Option Explicit
Sub incrementation()
With Sheets("Feuil1")
With .Range("a2", .Range("a" & .Rows.Count).End(xlUp)).Offset(, 1)
.Formula = "=row(a1)"
.Value = .Value
End With
End With
End Sub