Solved

EXCEL: HYPERLINK WITH DYNAMIC XLS FILE

Posted on 2014-11-28
8
388 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Logon script fails 23 45
Stop display of alerts in Word via Excel 12 16
Excel formula to report date modified 14 22
Copy and Paste Text into Text Box 3 25
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

809 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