View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fred Fred is offline
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