LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 3
Default VBA - Hyperlink Function Combined with Find

Thanks in advance to anyone offering assistance/suggestions to this problem.

Background: I am trying to embed the find function within my hyperlink destination address. Since I need to keep the code dynamic because the location of my information is always changing. I have a worksheet setup with a number of tables and headers. I have created a table of hyperlinks to easily access them, however, I cannot get the vba code to work.

Situation: Each header is unique, therefore, I need to combine a search function into the standard hyperlink vba.

Approach: In a nutshell, I want to be able to use find (or a variation of find) to locate my destination cell (which is a unique value), then pass the location (i.e.: B79) of the destination cell back to the hyperlink code within the sub-address section.

Here is how I have the VBA links structured.

Code:
Range("G6").Select    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _        "'Executive Summary - Charts'!A10"
I need to somehow combine the anchor with the find function.

Code:
Cells.Find(What:="All Data, Vendor 1", After:=ActiveCell, LookIn:= _        xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _        xlNext, MatchCase:=False, SearchFormat:=False).Activate
So that it would ultimately read something like:

Code:
Range("S6").Select    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _         Cells.Find(What:="All Data, Vendor 1", After:=ActiveCell, LookIn:= _        xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _        xlNext, MatchCase:=False, SearchFormat:=False).Activate
Any assistance would be greatly appreciated.

Last edited by Nalij : September 6th 12 at 03:04 PM
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
More on Combined IF Function Elaine Excel Worksheet Functions 2 April 9th 09 08:54 PM
Find earliest date combined with status Ixtreme Excel Discussion (Misc queries) 2 August 28th 07 04:14 AM
lookup combined with search to find keywords and then assign a cat jalbert1975 Excel Programming 7 September 22nd 06 07:45 PM
vlookup combined with AND-function martho Excel Worksheet Functions 1 January 20th 06 12:49 PM
Find min/max in 2 combined columns Tammi Excel Worksheet Functions 3 June 22nd 05 08:19 PM


All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"