+ Reply to Thread
Results 1 to 3 of 3

With Hyperlink formula & vba, I want to copy text of hyperlink to the cell it's linked to

  1. #1
    Registered User
    Join Date
    05-12-2017
    Location
    Hayward, CA
    MS-Off Ver
    2010
    Posts
    6

    With Hyperlink formula & vba, I want to copy text of hyperlink to the cell it's linked to

    Hello!


    Ok, so I've got this formula: =HYPERLINK("#'Sheet1'!D"&ROW(H11),H11)

    What it does is create a hyper link (in B11) and pull the text for said hyperlink from H11, and links to D11. As I copy the formula down, it pulls the text from the next cell down in column H, and links to the next cell down in column D. So the next cell down (B12) for example will pull its text from H12 and link to D12.

    The next thing I need this to do is when you click on the hyperlink in say, B11, I need the text of that hyperlink to copy and paste to the cell it's linked to (D11).

    I've got this code, which works, but it causes issues:

    Please Login or Register  to view this content.
    Here's what it looks like: http://imgur.com/qoxSocl

    The issue is if you highlight any group of cells anywhere I get "Run-time error '13': Type mismatch. The more important issue is when the code is entered in VBA, anytime any of the cells with a hyperlink formula are selected, the formula disappears. So I basically just need the code to not cause these issues...

    Thanks so much!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: With Hyperlink formula & vba, I want to copy text of hyperlink to the cell it's linked

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    05-12-2017
    Location
    Hayward, CA
    MS-Off Ver
    2010
    Posts
    6

    Re: With Hyperlink formula & vba, I want to copy text of hyperlink to the cell it's linked

    thanks! This works perfect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Highlight the cell linked by hyperlink
    By heli26283 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-06-2019, 12:25 AM
  2. Updating text linked to website in hyperlink
    By Confused&InDireNeed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2015, 10:02 PM
  3. [SOLVED] Excel 2010 Create a macro to check if cell contains hyperlink then apply hyperlink style
    By chasidar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 04:48 AM
  4. Replies: 1
    Last Post: 02-23-2013, 05:18 AM
  5. Replies: 3
    Last Post: 01-13-2012, 12:11 PM
  6. formula to copy a hyperlink from one cell to another?
    By zacharybleu in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-15-2006, 02:34 PM
  7. Macro to Copy Hyperlink to another file as a HYPERLINK, not text...
    By dollardoc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2005, 08:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1