Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to automate extraction of url, that change daily, from hyperli

I have an Excel file with urls in consequetive cells in a column. I want to
place the url information contained in the hyperlink in the cell next to the
hyperlink (the url is the info. that can be seen as you hover the mouse over
the hyperlink). The hyperlinks are dynamic and change regularly (almost
daily). Therefore the url information changes daily.

Things i have tried:
1. Use the edit hyperlink feature - copy the hyperlink and paste it in the
adjacent cell.
2. Use macro to automate the above action

The problem is:

The "copying of hyperlink" in step 1 is recorded as hard copy in the macro.
Hence, each time I run the macro, it just pastes the hard coded url in the
cell. It does not go to the source cell, copies the url in the cell and then
paste it. As I mentioned above, the hyperlink and therefore the urls in them
change frequently (almost daily). Therefore I need the copy function to copy
the url in the hyperlink at that time.

Your assistance is highly appreciated.

Thanks,

DM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default How to automate extraction of url, that change daily, from hyperli

Saved from a previous post:

One way to extract those URL's from a hyperlink created via Insert|Hyperlink
is with a userdefinedfunction.

Here's one that may help:

Option Explicit
Function GetURL(Rng As Range) As String
Application.Volatile

Set Rng = Rng(1)

If Rng.Hyperlinks.Count = 0 Then
GetURL = ""
Else
GetURL = Rng.Hyperlinks(1).Address
End If
End Function

So if you had a hyperlink in A1, you could put =getURL(a1) in that adjacent
cell.

Be aware that if you change the hyperlink, then this formula cell won't change
until your workbook calculates.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Dealmessenger wrote:

I have an Excel file with urls in consequetive cells in a column. I want to
place the url information contained in the hyperlink in the cell next to the
hyperlink (the url is the info. that can be seen as you hover the mouse over
the hyperlink). The hyperlinks are dynamic and change regularly (almost
daily). Therefore the url information changes daily.

Things i have tried:
1. Use the edit hyperlink feature - copy the hyperlink and paste it in the
adjacent cell.
2. Use macro to automate the above action

The problem is:

The "copying of hyperlink" in step 1 is recorded as hard copy in the macro.
Hence, each time I run the macro, it just pastes the hard coded url in the
cell. It does not go to the source cell, copies the url in the cell and then
paste it. As I mentioned above, the hyperlink and therefore the urls in them
change frequently (almost daily). Therefore I need the copy function to copy
the url in the hyperlink at that time.

Your assistance is highly appreciated.

Thanks,

DM


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to automate extraction of url, that change daily, from hyp

Thanks Dave....I did some research and have come aross the url you mentioned.
This is a fabulous community.

Cheers

"Dave Peterson" wrote:

Saved from a previous post:

One way to extract those URL's from a hyperlink created via Insert|Hyperlink
is with a userdefinedfunction.

Here's one that may help:

Option Explicit
Function GetURL(Rng As Range) As String
Application.Volatile

Set Rng = Rng(1)

If Rng.Hyperlinks.Count = 0 Then
GetURL = ""
Else
GetURL = Rng.Hyperlinks(1).Address
End If
End Function

So if you had a hyperlink in A1, you could put =getURL(a1) in that adjacent
cell.

Be aware that if you change the hyperlink, then this formula cell won't change
until your workbook calculates.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Dealmessenger wrote:

I have an Excel file with urls in consequetive cells in a column. I want to
place the url information contained in the hyperlink in the cell next to the
hyperlink (the url is the info. that can be seen as you hover the mouse over
the hyperlink). The hyperlinks are dynamic and change regularly (almost
daily). Therefore the url information changes daily.

Things i have tried:
1. Use the edit hyperlink feature - copy the hyperlink and paste it in the
adjacent cell.
2. Use macro to automate the above action

The problem is:

The "copying of hyperlink" in step 1 is recorded as hard copy in the macro.
Hence, each time I run the macro, it just pastes the hard coded url in the
cell. It does not go to the source cell, copies the url in the cell and then
paste it. As I mentioned above, the hyperlink and therefore the urls in them
change frequently (almost daily). Therefore I need the copy function to copy
the url in the hyperlink at that time.

Your assistance is highly appreciated.

Thanks,

DM


--

Dave Peterson

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
automatically change a number daily gary Excel Worksheet Functions 2 April 14th 08 08:39 PM
How to make the items in Drop Down List appear as workable hyperli dadejesus Excel Worksheet Functions 0 February 8th 08 06:47 PM
Automate extraction of data from mainframe report into spreadsheet Dave Cox Excel Discussion (Misc queries) 0 December 17th 07 10:09 PM
Can I use VBA to automate the recording of daily events? Will Excel Discussion (Misc queries) 0 October 4th 06 05:55 AM
How to automate daily interest in a balance sheet? JimS Excel Discussion (Misc queries) 0 May 10th 06 07:45 AM


All times are GMT +1. The time now is 06:57 PM.

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"