Thread
:
How to add prefix to names in a column
View Single Post
#
2
Posted to microsoft.public.excel.worksheet.functions
Claus Busch
external usenet poster
Posts: 3,872
How to add prefix to names in a column
Hi,
Am Sun, 30 Aug 2015 11:29:30 -0700 (PDT) schrieb
:
I have 1000 plant names in a column I want to add the prefix "http://www.google.com/images?q=" to
"Acer Campestre"
and so on become
http://www.google.com/images?q=Acer
Campestre
your names in column A. Then try:
Sub Hyp()
Dim LRow As Long, i As Long
Const myStr = "http://www.google.com/images?q="
With ActiveSheet
LRow = .Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To LRow
.Hyperlinks.Add _
anchor:=.Cells(i, 1), _
Address:=myStr & .Cells(i, 1)
Next
End With
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Reply With Quote
Claus Busch
View Public Profile
Find all posts by Claus Busch