LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup


Hi all-

I'm having a problem with the VLookup function. I have an excel fil
which automatically fills out several fields in a row when a certai
cell from that row is filled. The 'key' off of which the other field
key is filled via a drop-down data validation list. The 'subjugate
cells then are filled with values using the VLookup function. All o
this works to this point. However, I also use the VLookup function i
the coding for the sheet in order to automatically hyperlink some othe
relevant data. Some of the choices from the dropdown menu give me a
error, specifically:

Run-time erro '1004':
Unable to get the VLookup property of the WorksheetFunction class

What is perplexing is that only certain choices result in this error
whilst others work exactly in the method they are supposed to, th
VLOOKUP Formulas in the cells always 'grab' the correct tex
information. Other choices from the cell have the right text displayed
but an incorrect hyperlink. If it makes any difference, the locations o
the data from the list are formatted as 'General' text, and while som
of the choices are only numbers, some of them are numbers AND letters
and it seems to be predominantly the selections that contain number
and letters that have error issues. (For example, a selection of '115
from the list results in a correct listing of text display in th
'subjugate' cells as well as correct hyperlinks, whereas a selection o
'1035Zn' results in a 1004 error) Is this an artifact of the inheran
nature of the VLOOKUP function itself, or is it something that I'
doing wrong?

Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 2 Then
Cells(3, Target.Column).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=""
SubAddress:=WorksheetFunction.VLookup(Cells(2, Target.Column)
Range("A131:C200"), 3)
Cells(2, Target.Column).Select
Cells(6, Target.Column).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=""
SubAddress:=WorksheetFunction.VLookup(Cells(2, Target.Column)
Range("A131:G200"), 7)
Cells(2, Target.Column).Select
Cells(4, Target.Column).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection
Address:=WorksheetFunction.VLookup(Cells(2, Target.Column)
Range("A131:H200"), 8)
Cells(2, Target.Column).Select
Cells(5, Target.Column).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection
Address:=WorksheetFunction.VLookup(Cells(2, Target.Column)
Range("A131:H200"), 8)
Cells(2, Target.Column).Select
End If
End Sub

Thanks in advance for the help

--
chris_mannin
-----------------------------------------------------------------------
chris_manning's Profile: http://www.excelforum.com/member.php...fo&userid=2398
View this thread: http://www.excelforum.com/showthread.php?threadid=39346

 
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
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 07:33 PM
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 12:36 AM.

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"