So I figured out the solution. Instead of trying to use the find function. I made each header a defined range name then referenced that within the hyperlink
Code:
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"All_Data_All_Vendors", TextToDisplay:="Vendor1"
So now regardless of where the cell is within the worksheet, I will be able to hyperlink to it.
Quote:
Originally Posted by Nalij
The problem is that I do not know what the range is going to be. I can define the following:
Case Is ="All Data, Vendor 1": Application.Goto Worksheets("Dataset").Range("?????")
That is why i need to combine this with the find function, so that once the cell with "All Data, Vendor 1" is identified (say B89) it can pass that to the vba code, so that it would read:
Case Is ="All Data, Vendor 1": Application.Goto Worksheets("Dataset").Range("B89")
The range is constantly changing and dynamic which is why i cannot hardcode the cell range - I really don't know what it will be.
|