Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim selectedFile As Variant
' Adjust to your target range, e.g., column A
If Not Intersect(Target, Me.Range("A:A")) Is Nothing Then
Application.EnableEvents = False
For Each cell In Intersect(Target, Me.Range("A:A"))
If LCase(cell.Value) = "done" Then
' Open file picker
selectedFile = Application.GetOpenFilename("All Files (*.*), *.*", , "Select File to Link")
' If a file was selected
If selectedFile <> False Then
' Add hyperlink to the same cell
Me.Hyperlinks.Add _
Anchor:=cell, _
Address:=selectedFile, _
TextToDisplay:="Linked File"
End If
End If
Next cell
Application.EnableEvents = True
End If
End Sub