HyperLinks Cell Content Automation

kkorp

New Member
Joined
Feb 10, 2023
Messages
16
Office Version
  1. 2016
Platform
  1. Windows
I have a spreadsheet that we tracks our dell computers in. I have use the first column for the service tag. I would like to be able to have the sheet automatically create a hyperlink base off the content typed in the service tag column/cell and assign the service tag as the display text in the same cell and/or when you enter a new service tag. It would helpful to the others that use the spreadsheet when they need to look up anything about a specific Dell PC/Laptop.

Below is the URL that would point to the dell site.
The red text is the Service Tag Number passed from the cell.
This URL is Hyperlinked to the content of the cell and the display text is the same as the content of the Service Tag text. Also if the cell is empty don't create URL Hyperlink.
######/overview

P.S. is the possible
 
Ah, okay...before:
Application.EnableEvents = False
Add the following line:

if target.value = "" then exit sub
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Trying to attach hyperlink to text not cell, is this possible.

Help?
 
Upvote 0
Yes, that's the way this script will work. To clarify, if you have a row that is 3 times larger than a normal row...the user must click the text in the cell...not the white space in the cell.
 
Upvote 0
Thanks for the input, is there a way to modify the code to convert the cells that have content in the before the code was added.

any thoughts

Thanks
 
Upvote 0
For sure. Give this simple loop a try. Make sure your code in this loop is correct and update the range to match what you want updated...

VBA Code:
Private Sub RunOneTime()
Dim ncell As Range
Dim rng As Range
dim tempval as string


Set rng = ActiveSheet.Range("C9:C12")
For Each ncell In rng
tempval = ncell.value
  if ncell.value <>"" then
      ncell.Formula =  "=HYPERLINK(""[URL='https://www.dell.com/support/home/en-us/product-support/servicetag/']Product Support | Dell US[/URL]" & tempval & "/overview"",""" & tempval & """)"
 end if

Next ncell
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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