![]() |
creating hyperlink from cell data
Hi everyone, if I had a URL e.g. http://www.google in column A and the text Google in column B is there anyway of automatically making the text in column B a hyperlink based on the URL in column A? I'll be trying to do this with data from lots of rows and I'd be grateful if you can show me where to start please. -- Daminc ------------------------------------------------------------------------ Daminc's Profile: http://www.excelforum.com/member.php...o&userid=27074 View this thread: http://www.excelforum.com/showthread...hreadid=484839 |
creating hyperlink from cell data
Dim rng as Range, cell as Range
set rng = range(cells(1,2),cells(1,2).End(xldown)) for each cell in rng ActiveSheet.Hyperlinks.Add Anchor:=cell, _ Address:=cell.offset(0,-1).Value, _ TextToDisplay:=cell.Value Next -- Regards, Tom Ogilvy "Daminc" wrote in message ... Hi everyone, if I had a URL e.g. http://www.google in column A and the text Google in column B is there anyway of automatically making the text in column B a hyperlink based on the URL in column A? I'll be trying to do this with data from lots of rows and I'd be grateful if you can show me where to start please. -- Daminc ------------------------------------------------------------------------ Daminc's Profile: http://www.excelforum.com/member.php...o&userid=27074 View this thread: http://www.excelforum.com/showthread...hreadid=484839 |
creating hyperlink from cell data
Thanks Tom, it works great. I thought I had to count rows and all sorts. Perhaps even a vlookup o so :rolleyes: It also gives me something new to look into because there's a number o things in there that I've never seen before. How long have you been doing this to become so well versed -- Damin ----------------------------------------------------------------------- Daminc's Profile: http://www.excelforum.com/member.php...fo&userid=2707 View this thread: http://www.excelforum.com/showthread.php?threadid=48483 |
All times are GMT +1. The time now is 07:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com