Hi,
I am relatively new to macros - and have what is probably a fairly simple problem. I have found a macro that searches several sheets for a specific value (entered in Sheet2 cell D10), then displays a list of cell references containing that value. I need each cell reference to be a hyperlink so the user can click and go straight to that sheet/cell.
Sub finder()
Dim findvar As String
Dim sht
Dim cl
Dim outputvar As Long
findvar = Sheets("Sheet2").Range("D10").Value
outputvar = 0
For Each sht In ActiveWorkbook.Sheets
If sht.Name <> ActiveSheet.Name Then
For Each cl In sht.UsedRange
If InStr(cl.Value, findvar) <> 0 Then
Sheets("Sheet2").Range("B24").Offset(outputvar, 0).Value = sht.Name & "!" & cl.Address & " - " & cl.Value
outputvar = outputvar + 1
End If
Next
End If
Next
End Sub
I've spent all morning messing with the code via trial and error, but am stumped, any help really appreciated
Bookmarks