#1   Report Post  
Chris Manning
 
Posts: n/a
Default VLOOKUP Help

What I'm trying to do is have the VLOOKUP function return the actual formula
in the reference cell (Specifically, it is a HYPERLINK command) and what
happens is that the VLOOKUP function returns only the "freindly name" of the
hyperlink; that is, the link location is another place in the workbook, but
it returns what is displayed in the hyperlink cell. Is there any way to do
this, perhaps with another function, or modifying the VLOOKUP command? I did
see one solution that was posted on 5/31 involving adding code to the module,
but my problem with that solution is that there are MANY cells that reference
the same table, so that solution is out (it would involve adding near 4000
lines of code to the module. Any help is appreciated.

Chris

  #2   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Hi Chris,

I now know about which thread you were talking. No could you tell me
excactly what you are looking for. Try to give me an example. For instance
lets say you have only 2 cases instead of "A-IS" number of cases.

Mangesh


----------------------------------
This is in regards to a response you posted in the Discussion Group on
the Microsoft website two days ago. You gave her code in order to use
the VLOOKUP function in conjunction with module coding in order to
hyperlink a cell based upon a value entered in another cell. I am
trying to do the same exact thing, but the problem is that I need to
reference the same three column table for MANY cells in the same row
(for reference, my A10 cell and B10 cell are (A-IS)2 and (A-IS)3,
respectively) is there anyway to generalize your code so that each
pair acts independantly, but references the same table? Or am I going
to have to write that if statement for every pair? Any help is
appreciated greatly.
----------------------------------


"Chris Manning" wrote in message
...
What I'm trying to do is have the VLOOKUP function return the actual

formula
in the reference cell (Specifically, it is a HYPERLINK command) and what
happens is that the VLOOKUP function returns only the "freindly name" of

the
hyperlink; that is, the link location is another place in the workbook,

but
it returns what is displayed in the hyperlink cell. Is there any way to do
this, perhaps with another function, or modifying the VLOOKUP command? I

did
see one solution that was posted on 5/31 involving adding code to the

module,
but my problem with that solution is that there are MANY cells that

reference
the same table, so that solution is out (it would involve adding near 4000
lines of code to the module. Any help is appreciated.

Chris



  #3   Report Post  
Mangesh Yadav
 
Posts: n/a
Default

Hi Chris,

Here's the solution you are looiking for:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 10 Then
Cells(11, Target.Column).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection,
Address:=WorksheetFunction.VLookup(Cells(10, Target.Column), Range("A1:C3"),
3)
Cells(10, Target.Column).Select
End If
End Sub


Note:
Line 2: change 10 to 2 as your target row is A-IS2
Line 3: change 11 to 3 as that is the next row A-IS3
Line 4 & 5: change 10 to 2

The above code is for my example which was as per the link:
http://excelforum.com/showthread.php?t=375191


Mangesh




"Chris Manning" wrote in message
...
What I'm trying to do is have the VLOOKUP function return the actual

formula
in the reference cell (Specifically, it is a HYPERLINK command) and what
happens is that the VLOOKUP function returns only the "freindly name" of

the
hyperlink; that is, the link location is another place in the workbook,

but
it returns what is displayed in the hyperlink cell. Is there any way to do
this, perhaps with another function, or modifying the VLOOKUP command? I

did
see one solution that was posted on 5/31 involving adding code to the

module,
but my problem with that solution is that there are MANY cells that

reference
the same table, so that solution is out (it would involve adding near 4000
lines of code to the module. Any help is appreciated.

Chris



Reply
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
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
make a vlookup using a variable path Alex St-Pierre Excel Worksheet Functions 1 March 2nd 05 11:54 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM
VLOOKUP not working Scott Excel Worksheet Functions 3 November 12th 04 08:06 PM


All times are GMT +1. The time now is 08:18 PM.

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

About Us

"It's about Microsoft Excel"