Solved

Excel: How to Copy Hyperlink Cell To Another Cell

Posted on 2011-09-13
6
858 Views
Last Modified: 2012-08-14
Hello,
I have a simple equation that returns a value in a cell so that when you click on it, it is a hyperlink. This works. = IF(AC7>0, (HYPERLINK((VLOOKUP(AC7, $AM$7:$AN$3000, 2, FALSE)),AC7)), ""). It returns a "friendly location" which is a 4 digit number and a link location (on the web) when you click on it.

How do I copy and paste just the VALUE to another cell so that again, when you click on that copied value, the hyperlink works. Right now, the value is copied but it is no longer a hyperlink. I can't have the equation in the new cell because of other reasons.

Thanks,
Dennis
0
Comment
Question by:u002dag
  • 2
  • 2
  • 2
6 Comments
 
LVL 10

Expert Comment

by:SANTABABY
ID: 36531260
Your formula is trying to find a cell in the range specified for the value (same as in AC7). Note that the lookup range is fixed but AC7 is not an absolute reference, so when you copy/paste the formula into another cell the reference going to chnage(somethin else in place of AC7). Please make sure that the value of the new reference does exist in the range. Then the hyperlink should work. You can attach a sample sheet, so that I can get a better idea of your problem.
0
 
LVL 5

Expert Comment

by:slycoder
ID: 36531360
I would insert a column next to your current formula that does the VLOOKUP of the hyperlink

=VLOOKUP(AC7, $AM$7:$AN$3000,2,FALSE)

that would be your list.

0
 
LVL 5

Expert Comment

by:slycoder
ID: 36531377
To make it "hot", naturally it would be

=HYPERLINK(VLOOKUP(AC7, $AM$7:$AN$3000,2,FALSE),VLOOKUP(AC7, $AM$7:$AN$3000,2,FALSE))


Hope this helps.
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:u002dag
ID: 36531397
Hi SantaBaby,
Thanks for the quick response. I attached a sample sheet as you requested.

Goal:      
Need 4 Digit Value in Column B, copied to column A with the hyperlink of column B      
So it's no longer an equation that's being copied over.      

I found this on the web, is it of any help?

But this code fails if source cell doesn't contains hyperlinks

Sub copyHyperlink()
r = Selection.Rows.Count
For i = 1 To r
ActiveSheet.Hyperlinks.Add Anchor:=Selection.Cells(i, 2), _
Address:=Selection.Cells(i, 1).Hyperlinks(1).Address
Next
End Sub


EOS-Assistant-experts-exchange-v.xls
0
 
LVL 10

Accepted Solution

by:
SANTABABY earned 500 total points
ID: 36531526
Could you please try to change your formula?
Add a $ sign befor ecah reference C column in your formula.
Example: Change the formula in B8 from:

= IF(C8>0, (HYPERLINK((VLOOKUP(C8, $D$7:$E$3000, 2, FALSE)),C8)), "")

to

= IF($C8>0, (HYPERLINK((VLOOKUP($C8, $D$7:$E$3000, 2, FALSE)),$C8)), "")

Once you complete the change, copy B8 and apply it to other cells in column B to change all formulae in column B.

The the formua will refer to C coulmn for lookup, no matter where you copy it to (as long the destination is in the same row).

You can try your copy at this point.

Please let me know if this helps.

0
 

Author Closing Comment

by:u002dag
ID: 36531780
Thanks.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question