Avatar of bruno_boccara
bruno_boccara
Flag for France asked on

EXCEL: HYPERLINK WITH DYNAMIC XLS FILE

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 ...
Microsoft ExcelVB ScriptVisual Basic Classic

Avatar of undefined
Last Comment
Martin Liss

8/22/2022 - Mon
Simon

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
Tapan Pattanaik

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.
bruno_boccara

ASKER
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 ?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Tapan Pattanaik

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
ASKER CERTIFIED SOLUTION
Hakan Yılmaz

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
bruno_boccara

ASKER
Please let the question open.
did not have time to check the solution.
But it is very important for me.

Regards.
Martin Liss

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.