The below script takes a strings from one column (cell by cell) and compares it with strings in another column. If it finds a match it creates a hyperlink between the two cells.
With this script I have one problem. I will give an example.
Lets say the seach string is "link". The script will create a hyperlink to any cell that contains this string, even for example to "blinker".
That is not good. Is there a way to modify this code so that hits are limited to exact matches?
For JAuth2Rw = 2 To LastRow
JAuthName = Sheets("Author ranking").Cells(JAuth2Rw, LastColumn)
With Sheets("SC-Author ranking").Range(Sheets("SC-Author ranking").Cells(2, 1), Sheets("SC-Author ranking").Cells(LastRowJ, 1))
Set rngFoundCell = .Find(What:=JAuthName, After:=.Cells(1, 1), LookAt:=xlPart)
If Not rngFoundCell Is Nothing Then
strFirstAddress = rngFoundCell.Address
Do
Sheets("Author ranking").Hyperlinks.Add Anchor:=Cells(JAuth2Rw, LastColumn), Address:="", _
SubAddress:="'SC-Author ranking'!" & rngFoundCell.Address
Set rngFoundCell = .FindNext(rngFoundCell)
Loop While Not rngFoundCell Is Nothing And rngFoundCell.Address <> strFirstAddress
End If
End With
Next JAuth2Rw
Bookmarks