Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to add prefix to names in a column

I have 1000 plant names in a column I want to add the prefix "http://www.google.com/images?q=" to

So

"Acer Campestre"

and so on become

http://www.google.com/images?q=Acer Campestre

This is a one time operation, as I will copy all these links to somewhere else.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a prefix to a column of numbers in an excel document? Beth Excel Worksheet Functions 4 August 25th 12 01:32 PM
How do I set an 'M' prefix to existing text in a column? muppetlover27 New Users to Excel 2 June 10th 08 01:41 PM
prefix a column of numbers with combination of zeros pinny Excel Discussion (Misc queries) 2 July 31st 06 04:46 PM
Adding a prefix to all numbers in a column. Randy Excel Discussion (Misc queries) 2 February 5th 06 08:11 AM
how do i prefix a column with letters prefixing columns Excel Discussion (Misc queries) 2 April 28th 05 01:12 PM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"