Not sure what
last 6 characters of
the hyperlink are contacted in that cell.
means, but unless you need the hyperlink placed in the cell with the
information (rather than another cell that uses the information), then a
worksheetfunction can be used.
However, if you want a macro, turn on the macro recorder and add the
hyperlink manually.
Turn off the macro recorder and alter the code to construct the URL you want
and pass it as an argument to the hyperlink.ADD method that you recorded.
This is what i recorded:
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"
http://www.msnbc.msn.com/id/6306132/", TextToDisplay:="A"
so lets say the cell contains 6306132
I would modify it to
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _
"
http://www.msnbc.msn.com/id/" & Activecell.Value & "/", _
TextToDisplay:=ActiveCell.Value
now I could add a loop to go through my cells selected
Sub AddLinks()
for each cell in Selection
cell.Activate
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _
"
http://www.msnbc.msn.com/id/" & Activecell.Value & "/", _
TextToDisplay:=ActiveCell.Value
Next
End sub