Sub Liens()
Dim Cell As Range, Plage As Range
With ActiveSheet
Set Plage = .Range("B3", .Cells(.Rows.Count, "B").End(xlUp))
End With
For Each Cell In Plage.Cells
ActiveSheet.Hyperlinks.Add Anchor:=Cell.Offset(0, 2), Address:="", SubAddress:= _
Cell.Value, TextToDisplay:=CStr(Cell.Offset(0, -1))
Next Cell
End Sub
Sub Liens()
Dim Cell As Range, Plage As Range
With ActiveSheet
Set Plage = .Range("B3", .Cells(.Rows.Count, "B").End(xlUp))
End With
For Each Cell In Plage.Cells
ActiveSheet.Hyperlinks.Add Anchor:=Cell.Offset(0, 2), Address:="", SubAddress:= _
Cell.Value, TextToDisplay:=CStr(Cell.Offset(0, -1))
Next Cell
End Sub
Merci beaucoup sylvanu ! Cela marche parfaitement ! désolé du délai. A très bientôt.Bonjour Simsinaty,
Un essai en PJ avec :
' Cell.Offset(0, 2) car décalage de 2 colonnes à droiteVB:Sub Liens() Dim Cell As Range, Plage As Range With ActiveSheet Set Plage = .Range("B3", .Cells(.Rows.Count, "B").End(xlUp)) End With For Each Cell In Plage.Cells ActiveSheet.Hyperlinks.Add Anchor:=Cell.Offset(0, 2), Address:="", SubAddress:= _ Cell.Value, TextToDisplay:=CStr(Cell.Offset(0, -1)) Next Cell End Sub
' Cell.Offset(0, -1) car décalage de 1 colonnes à gauche