HYPERLINK in a Function using for example "mrexcel.com/forum/" & string" How to apply it in a function?

makiwara

Board Regular
Joined
Mar 8, 2018
Messages
171
Hi!

So I have something like this:

Function InsertHyperlink (x as string) as string


InsertHyperlink = "=HYPERLINK(""www.mrexcel.com/forum/" & x")"

end Function

Since it's totally wrong, any idea? Have a nice day!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
I am not sure about your requirement. I assume that you tried to create a new function to add a text to a hyperlink. Instead of it, you can use the following function.

=HYPERLINK("www.mrexcel.com/forum/"&"x")

Kind regards

Saba
 
Upvote 0
Thank you!

But unfortunately, although the result is a clickable link, it shows an error message every time I try to click on it.

"The address is invalid" or something similar.

Case 1:
www.google.hu/gmail WORKS FINE WHEN I TYPE IT
Case 2:
=HYPERLINK("www.google.hu/" & "gmail") it's clickable too, but shows the invalid error message every time i click.

Any idea? And if we could use VBA to solve it that would be great because the best scenario would be for me a VBA function, which generates HYPERLINKS using a cell's value (which is "x" in my function)

Thank you for your answer! It means to me a lot! Have a nice day! :-)



I am not sure about your requirement. I assume that you tried to create a new function to add a text to a hyperlink. Instead of it, you can use the following function.

=HYPERLINK("www.mrexcel.com/forum/"&"x")

Kind regards

Saba
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top