<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bohack &#187; Excel</title>
	<atom:link href="http://www.bohack.com/tag/excel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bohack.com</link>
	<description>Check In and Tune Out!</description>
	<lastBuildDate>Wed, 24 Feb 2010 18:55:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Get the URL from a hyperlink in Excel</title>
		<link>http://www.bohack.com/2009/06/get-the-url-from-a-hyperlink-in-excel/</link>
		<comments>http://www.bohack.com/2009/06/get-the-url-from-a-hyperlink-in-excel/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:01:59 +0000</pubDate>
		<dc:creator>Bohack</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.bohack.com/?p=324</guid>
		<description><![CDATA[Recently I needed to extract a links from a web page; normally I would use some Linux commands ported to windows and get the job done. In the end I needed to format the relative link to a full URL, so I decided to use Excel. However when I imported the web page into excel [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to extract a links from a web page; normally I would use some Linux commands ported to windows and get the job done. In the end I needed to format the relative link to a full URL, so I decided to use Excel. However when I imported the web page into excel I found that the URL was embedded in the friendly name of the hyperlink.</p>
<p><span id="more-324"></span>The hyperlink command in excel actually does the reverse of what I needed; it creates a hyperlink out of the URL and a friendly name and I needed the URL from the friendly name. So I dug in a little deeper and treated the URL like an object. It has properties and those properties can be exposed. The hyperlinkcell object has a type of range so it is passed to the function of GETURL. The first hyperlink in the range we will want the property of the address. Then we simply pass it back to the function so that we can display it.</p>
<p>To install this all you need to do is:</p>
<ol>
<li>Hit ALT + F11 (Opens Visual Basic Editor)</li>
<li>Click on Insert -&gt; Module (adds a module to your excel file)</li>
<li>Paste the code below for the function of GETURL</li>
<li>Hit ALT + Q (Closes the Visual Basic Editor)</li>
</ol>
<p>Now use the =GETURL(cell) to get the URL</p>
<p>Example: =GETURL(A1) will return the URL for the Hyperlink displayed in cell A1</p>
<pre>Function GETURL(HyperlinkCell As Range)

 GETURL = HyperlinkCell.Hyperlinks(1).Address

End Function</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bohack.com/2009/06/get-the-url-from-a-hyperlink-in-excel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
