Solved

EXCEL: HYPERLINK WITH DYNAMIC XLS FILE

Posted on 2014-11-28
8
379 Views
Last Modified: 2014-12-26
Hello,
I have a Excel file with odbc connexion.
for the sample I need the following:

col A - data
col B - URL
col C - data

is there a way to make automatically col B hyperlink link ?
I know how to do it with normal xls spreed but not with dynamic ...
0
Comment
Question by:bruno_boccara
8 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40470217
Would it be acceptable to put a formula column to the right of the results columns?
=HYPERLINK(B1)
or make the dynamic columns hidden and create 3 columns to the right so you have
=A1
=HYPERLINK(B1)
=C1
0
 
LVL 21

Expert Comment

by:Tapan Pattanaik
ID: 40470219
Hi bruno_boccara,

If you don't want to create a macro and as long as you don't mind an additional column, then just create a new column alongside your column of URLs. (here, col B)

In the new column type in the formula =HYPERLINK(B). Then copy the formula down the rest of the  entries.
0
 

Author Comment

by:bruno_boccara
ID: 40470247
I do not want to add manually formula.

If I have to create a macro , it is also ok with me. what will be the macro ?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 21

Expert Comment

by:Tapan Pattanaik
ID: 40470285
Public Sub Convert_To_Hyperlinks()
    Dim Cell As Range
    For Each Cell In Intersect(Selection, ActiveSheet.UsedRange)
        If Cell <> "" Then
            ActiveSheet.Hyperlinks.Add Cell, Cell.Value
        End If
    Next
End Sub
0
 
LVL 5

Accepted Solution

by:
Hakan Yılmaz earned 500 total points
ID: 40472199
You may try this.

Sub MakeRangeHyper(ByRef LinkRange As Range)
      Dim iterCell As Range
      For Each iterCell In Intersect(LinkRange, LinkRange.Worksheet.UsedRange)
            LinkRange.Worksheet.Hyperlinks.Add iterCell, iterCell.Value2
      Next iterCell
End Sub

Open in new window


You should call this sub with a reference to cells that have link addresses. Example:

Sub StartHyper()
    MakeRangeHyper ActiveWorkbook.ActiveSheet.UsedRange
    MakeRangeHyper ActiveWorkbook.ActiveSheet.Range("B4:B5")
    MakeRangeHyper ThisWorkbook.Worksheets("Sheet1").Range("B4:B5")
End Sub

Open in new window

0
 

Author Comment

by:bruno_boccara
ID: 40512706
Please let the question open.
did not have time to check the solution.
But it is very important for me.

Regards.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40518270
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now