Determing if a Hyperlink Exists

mj0lnr

New Member
Joined
May 6, 2003
Messages
46
All,

This one might be fairly simple (of course if that was simple, I'd have figured it out by now) but, what I'd like to accomplish is the following:
  • 1)Comb thru a column (H) and check if a hyperlink exists
    2)If YES, leaves it alone
    3)If NOT, selects the cell and checks the rest of the H column for the same condition
    4)Selects all cells WITHOUT a hyperlink
    5)Determines 1st cell without a hyperlink

Many Thanks in advance,
A.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You are welcome. :biggrin:

Code:
sub kdsfkjhdsjk()
Dim cl As Range, y As String
On Error Resume Next 
For Each cl In Range([h23], [h65536].End(3)) 
    y = cl.Hyperlinks(1).Name 
    If Err.Number <> 0 Then
       if isnumeric(cl) then 
        cl.Hyperlinks.Add Anchor:=cl, _ 
          Address:="http://IM/Peregrine/WhatsMyStatus/" & _
            default.asp?ProbID=IM" & cl & _
            "&submit1=Get+Ticket+Information&SearchName=" 
         cl.value = cstr(cl)
       end if
       Err.Clear 
    End If 
Next
end sub
 
Upvote 0
Nate....I'm not worthy! Thank you! :pray:

& thank you Brett.....all you "Excelperts" flat out rock!
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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