Happy Friday!
I'm trying to define run code only if the value does not match one of the values in a Named Range on another sheet. Sadly, it's not working.
Here's what I have:
I'm trying to define run code only if the value does not match one of the values in a Named Range on another sheet. Sadly, it's not working.
Here's what I have:
VBA Code:
Sub AddJobEditHyperlinks()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim cl As Range
Dim Hol As Range
Set Hol = Worksheets("Holidays").Range("HolidaysAll")
For Each cl In Range("SubLotColumn", Range("C" & Rows.Count).End(xlUp))
If cl.Value <> Hol Then
ActiveSheet.Hyperlinks.Add Anchor:=cl, Address:="", SubAddress:=cl.Address, ScreenTip:="Click To Open Job Edit Window"
End If
Next cl
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub