Hyperlink concatenated exceed 255 characters

thomas854

New Member
Joined
Nov 23, 2017
Messages
8
Hello guys,

First thank you for this great forum and all informations !

Well, I will explain my issue.


I need to open a Hyperlink concatenated in a cell (by example A1) who exceed 255 characters.
I tried a lot of VBA, macros and all have an issue...

The cell must be clickable and show a hyperlink name like "CLICK HERE" and need to open the very long url in the default browser.

Please I need your help.
 
This is because column H contains a formula.
The corrected code will insert the link (with the click option) into the J column


Sub hyp()




Dim rng As Range
Set rng = Application.Range("H4:H299")
Dim cel As Range
Dim i As Integer
i = 1




For Each cel In rng


ActiveSheet.Hyperlinks.Add Anchor:=cel.Offset(0, 2), Address:=cel.Value, ScreenTip:="My Link", TextToDisplay:="Click Here" & i


i = i + 1




Next




End Sub
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi,

Thanks again for your reply,

This time the 2 issues are solved.


- Well, now all hyperlinks are created in the column "J", so how to set the new hyperlinks in the column "H" as I moved the actual concatenated formula in the column "V"?

- Also the hyperlink name are created and are working but look like this : CLICK HERE1, CLICK HERE2, CLICK HERE3,CLICK HERE4...
It is possible to have the hyperlink name only as "CLICK HERE" without the line number?



Thanks again & again. ;)
 
Upvote 0
Well, I solved that by myself!

Now all is working fine! Thank you again for your help and your time dear admiral100, you are the man! ;)
Maybe for fun how in the VBA script add a condition (if) to create the hyperlink name only if they are data entered (in lineX) in the column "E"?


And if you agree and you have enough time I need again your help, always for the same file...

The column "G" open a local folder to next add a picture in it...
It is possible when I click on the link to open a dialog box to search the right picture, next move this picture in the folder with the name (of the right line) in the column A&B? :rolleyes:


Thanks!!!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

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