Hello,
I'm looking for a way to take the contents of a cell and convert it to a custom hyperlink when a cell change is detected. I'm currently using a drop-down list in one column, and another to build the custom URL using that drop-down list selection.
Here's what I'm using currently to only build the hyperlink if the cell is not blank, AND beginss with a lowercase letter.
For example, the above formula will produce the following URL if the cell value is "lapl"
I was looking at the following post, but I'm not sure how to change it to achieve the same results my formula is doing.
I thought I could recycle an "Evaluate" code that I'm using elsewhere, but it's not liking it:
I have another sheet where I'm using a Worksheet Change solution and suspect I'll reuse that and just change the part where action is taken on the cell changes to generate the hyperlink.
Any advice would be greatly appreciated…
I'm looking for a way to take the contents of a cell and convert it to a custom hyperlink when a cell change is detected. I'm currently using a drop-down list in one column, and another to build the custom URL using that drop-down list selection.
Here's what I'm using currently to only build the hyperlink if the cell is not blank, AND beginss with a lowercase letter.
Excel Formula:
=IF(ISBLANK([@[Digital Library]]),"",
IF(AND(CODE(LEFT([@[Digital Library]],1))>96,CODE(LEFT([@[Digital Library]],1))<123),
HYPERLINK(TEXTJOIN("",TRUE,"https://",[@[Digital Library]],".overdrive.com"),[@[Digital Library]]),""))
Rich (BB code):
https://lapl.overdrive.com
Convert text to hyperlinks with VBA
Hi there, I've looked around all over and cannot find the answer anywhere easily: I have thousands of text URL's that im trying to convert to clickable links in column B of my sheet (excel 2010). Now I know you can do this with a drag down of a formula =hyperlink ect , but I am trying to make...
www.mrexcel.com
Excel Formula:
SetURL = Evaluate("FORMULA HERE")
I have another sheet where I'm using a Worksheet Change solution and suspect I'll reuse that and just change the part where action is taken on the cell changes to generate the hyperlink.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Set Change Scope to Table Column B only
If Intersect(Target, Range("B" & Rows.Count).End(xlUp)) Is Nothing Then Exit Sub
Dim Changed As Range, c As Range
Dim Scheme As String, Subdomain As String, Domain As String
Scheme = "https://"
Domain = ".overdrive.com"
Set Changed = Intersect(Target, Range("B" & Rows.Count).End(xlUp))
If Not Changed Is Nothing Then
Application.EnableEvents = False
For Each c In Changed
Subdomain = ActiveCell.Value
If <cell is not blank> Then <create url/hyperlink>
Next c
Application.EnableEvents = True
End If
End Sub
Any advice would be greatly appreciated…