Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Vlookup problem - unable to get the vlookup property

Hi
I've been reading posts and trying all kinds of things with no luck.

Dim Char23PayorName as String
Dim SumRW as Integer 'using the current row

Char23PayorName = Application.VLookup(Range("A" _
& SumRW).Value, "Payor_Payee!A2:D10000", 4, False)

I think the problem is in that the value returned for the lookup value is
text and not a number. When debugging, it is showing the lookup value as
"Nameabc". The result of this formula will be text.

I have restructrued the code to put a formula in a cell. However, the
#NAME? error is returned from the formula. The formula in that cell reads:
=vlookup(Nameabc, Payor_Payee!A2:D10000, 4, False). If I put quotation marks
around the vlookup value in the formula "Nameabc", then it works.

Please help while I still remain somewhat sane. Thanks
Fred
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Vlookup problem - unable to get the vlookup property

Hi,

Try this

Char23PayorName = Application.VLookup(Range("A" & SumRW).Value, _
Range("Payor_Payee!A2:D10000"), 4, False)

Mike

"Fred" wrote:

Hi
I've been reading posts and trying all kinds of things with no luck.

Dim Char23PayorName as String
Dim SumRW as Integer 'using the current row

Char23PayorName = Application.VLookup(Range("A" _
& SumRW).Value, "Payor_Payee!A2:D10000", 4, False)

I think the problem is in that the value returned for the lookup value is
text and not a number. When debugging, it is showing the lookup value as
"Nameabc". The result of this formula will be text.

I have restructrued the code to put a formula in a cell. However, the
#NAME? error is returned from the formula. The formula in that cell reads:
=vlookup(Nameabc, Payor_Payee!A2:D10000, 4, False). If I put quotation marks
around the vlookup value in the formula "Nameabc", then it works.

Please help while I still remain somewhat sane. Thanks
Fred

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Vlookup problem - unable to get the vlookup property

Auuugggghhhhh! So close!

Thanks Mike, works great!


"Mike H" wrote:

Hi,

Try this

Char23PayorName = Application.VLookup(Range("A" & SumRW).Value, _
Range("Payor_Payee!A2:D10000"), 4, False)

Mike

"Fred" wrote:

Hi
I've been reading posts and trying all kinds of things with no luck.

Dim Char23PayorName as String
Dim SumRW as Integer 'using the current row

Char23PayorName = Application.VLookup(Range("A" _
& SumRW).Value, "Payor_Payee!A2:D10000", 4, False)

I think the problem is in that the value returned for the lookup value is
text and not a number. When debugging, it is showing the lookup value as
"Nameabc". The result of this formula will be text.

I have restructrued the code to put a formula in a cell. However, the
#NAME? error is returned from the formula. The formula in that cell reads:
=vlookup(Nameabc, Payor_Payee!A2:D10000, 4, False). If I put quotation marks
around the vlookup value in the formula "Nameabc", then it works.

Please help while I still remain somewhat sane. Thanks
Fred

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
"Unable to get the VLookup property of the WorksheetFunction class Ayo Excel Discussion (Misc queries) 4 August 6th 08 10:00 PM
Vlookup property missing Jennifer Excel Programming 3 November 30th 07 01:54 PM
Unable to get the Vlookup property of the WorksheetFunction class DoctorG Excel Programming 1 March 17th 06 07:49 PM
Unable to get the Vlookup Property of the WorkSheetFunction Class monagan Excel Programming 2 August 3rd 04 09:32 PM
Unable to get VLOOKUP property cici Excel Programming 1 February 11th 04 12:24 AM


All times are GMT +1. The time now is 02:19 AM.

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"