Solved

EXCEL: HYPERLINK WITH DYNAMIC XLS FILE

Posted on 2014-11-28
8
401 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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 47

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

688 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